I run the following Python script and receive the following error message:
mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'check' at line 1")
When I changed the database from check to check1 it the script works and also I didn't have earlier defined "check" database.
import MySQLdb as db
db1 = db.connect(host="localhost",user="root",passwd="vision@123")
cursor = db1.cursor()
sql = "CREATE DATABASE check;"
cursor.execute(sql)
db1.close()