一,使用pymysql模块连接Mysql数据库报错,原因是所连接的数据库未授权;

二,Mysql服务器进行授权操作;
mysql> grant select ,insert,create,drop,alter,delete,index,update,create view,references on input_db.* to 'conn_mysql_name'@'%';

三,再次进行运行连接程序,连接失败问题解决;

文章讲述了使用pymysql模块连接Mysql时遇到的未授权错误,介绍了在Mysql服务器上为特定用户授权的过程,并展示了如何解决连接失败的问题。
一,使用pymysql模块连接Mysql数据库报错,原因是所连接的数据库未授权;

二,Mysql服务器进行授权操作;
mysql> grant select ,insert,create,drop,alter,delete,index,update,create view,references on input_db.* to 'conn_mysql_name'@'%';

三,再次进行运行连接程序,连接失败问题解决;

3146