import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd=""
)
mycursor = mydb.cursor()
mycursor.execute("CREATE DATABASE mydatabase")
this is the prog i want to run
runfile('C:/Users/ABIR/AppData/Local/Programs/Python/Python37/untitled0.py', wdir='C:/Users/ABIR/AppData/Local/Programs/Python/Python37')
Traceback (most recent call last):
File "C:\Users\ABIR\AppData\Local\Programs\Python\Python37\untitled0.py", line 8, in <module>
import mysql.connector
File "C:\Users\ABIR\mysql.py", line 1, in <module>
import mysql.connector
ModuleNotFoundError: No module named 'mysql.connector'; 'mysql' is not a package
this error msg I am getting.
I have successfully installed the mysql package
please help