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

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to spyderlib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/e9e670cb-199a-43df-9c00-b3bf495b4136%40googlegroups.com.

Reply via email to