Home > other > Under macos pycharm connection mysql error pymysql. Err. OperationalError: 2003
Under macos pycharm connection mysql error pymysql. Err. OperationalError: 2003
Time:10-03
Class set for learning PYTHON and mysql Mysql has been installed, navicat also can connect, pycharm even, Pycharm with edu version MYSQL8
CodePudding user response:
1. Restart your Mysql server try 2. Change the host localhost to 127.0.0.1 try 3. When you were a second Navicat screenshots test database, even the mysql database in your code, make sure your code to connect the mysql database account and password is correct, 4. No really, try using other libraries, such as MySQLdb, if MySQLdb can connect, pymysql can't, that there is something wrong with the library compatible,
Currently: that is your user name, password, permission, etc., set up the inaccurate, find out, should be able to find out why,
Other resources: [resolved] pymysql Connection error: pymysql. Err. OperationalError 2003 Can 't connect to MySQL server on mysql.rds.aliyuncs.com Errno Connection refused - 61 on the wayPython3. X connect Pymysql_python, mysql, mac_memoryjdch blog - CSDN