pymysql.err.InternalError: (1130, "Host '127.0.0.1' is not allowed to connect to this MySQL server")的錯誤解決


原因:不容許本地機器連遠程mysql服務。

使用下列步驟解決即可:

mysql -u root -p

mysql>use mysql;

mysql>select 'host' from user where user='root';

mysql>update user set host = '%' where user ='root';

mysql>flush privileges;

以上。

參考:https://blog.csdn.net/appleyuchi/java/article/details/103941664


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM