pymysql.err.InternalError: (1049, "Unknown database 'test'")
解决方法:
在mysql中创建名称为 'test’的数据库
mysql>create database test character set utf8;
再次运行,可行
C:\Anaconda3\python.exe D:/AI/三酷猫源代码/第12章/MySQLLink.py
T_fish表可以使用!
Process finished with exit code 0
本文介绍了解决在使用pymysql连接Python时遇到的未知数据库'test'错误的方法。通过在MySQL中创建名为'test'的数据库,并设置字符集为utf8,成功解决了这一问题,使T_fish表能够正常运行。
2507

被折叠的 条评论
为什么被折叠?



