Error 1049 (42000): Unknown database 'test'

Trouble

>>>>   conn = mysql.connector.connect(user='root', password='password', database='test')
...
...

mysql.connector.errors.ProgrammingError: 1049 (42000): Unknown database 'test'

Shooting

Its a common error which happens when we try to access a database which doesn't exist. So create the database using:

mysql> CREATE DATABASE test;

read more

你可能感兴趣的:(Error 1049 (42000): Unknown database 'test')