ERROR 2003 (HY000): Can’t connect to MySQL server (111)

Please check your listenning ports with : netstat -nat |grep :3306 If it show tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN Thats is ok for your remote connection. But in this case i think you have tcp 0 192.168.1.3:3306 0.0.0.0:* LISTEN Thats is ok for your remote connection. You should also check your firewall (iptables if … Read more

PyMySQL can’t connect to MySQL on localhost

Two guesses: Run mysqladmin variables | grep socket to get where the socket is located, and try setting up a connection like so: pymysql.connect(db=’base’, user=”root”, passwd=’pwd’, unix_socket=”/tmp/mysql.sock”) Run mysqladmin variables | grep port and verify that the port is 3306. If not, you can set the port manually like so: pymysql.connect(db=’base’, user=”root”, passwd=’pwd’, host=”localhost”, port=XXXX)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)