When i run the code below in python 2.7.7, i get the error also below.
code:
import MySQLdb
db = MySQLdb.connect(
host="localhost",
port=3306,
user="root",
passwd="mypassword",
db="python"
)
error:
'_mysql_exceptions.OperationalError: (1049, "Unknown database 'python'")'
The database was made using MySQL Workbench and saved to the desktop (same location as python file) with the name python. I'm not using Django or anything like that and can't find answers where the person isn't using it. Please help.
MySQL Server
?? Look at your OS services. – kmas Jun 25 at 12:23