Answers for "mysql db"

SQL
0

python and mysql connectivity

import pymysql

############### CONFIGURE THIS ###################
# Open database connection
db = pymysql.connect("database_host","username","password","database_name")
##################################################

# prepare a cursor object using cursor() method
cursor = db.cursor()

# execute SQL query using execute() method.
cursor.execute("SELECT VERSION()")

# Fetch a single row using fetchone() method.
data = cursor.fetchone()
print ("Database version : {0}".format(data))

# disconnect from server
db.close()
Posted by: Guest on May-16-2020
0

what is mysql?

MySQL is an open source DBMS which is built, supported and distributed by MySQL(ORACLE).
Posted by: Guest on December-22-2020
-1

MYSQL

GRANT CREATE ON *.* TO 'testuser'@'localhost';
Posted by: Guest on September-30-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language