mysql-error-2003

PyMySQL can't connect to MySQL on localhost

岁酱吖の 提交于 2019-11-27 12:21:09
I'm trying to connect to MySQL on localhost using PyMySQL: import pymysql conn = pymysql.connect(db='base', user='root', passwd='pwd', host='localhost') but (both on Python 2.7 and Python 3.2) I get the error: socket.error: [Errno 111] Connection refused pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (111)") I'm sure mysqld is running because I can connect using mysql command or phpMyAdmin. Moreover, I can connect using MySQLdb on Python 2 with nearly the same code: import MySQLdb conn = MySQLdb.connect(db='base', user='root', passwd='pwd', host='localhost')

Trying to connect to remote MySQL host (error 2003)

亡梦爱人 提交于 2019-11-27 08:50:27
I have a MySQL instance running on a Debian server and I can connect to it locally with no problems. However, I am unable to connect to it remotely. When I try this from my command line I get the following error: ERROR 2003 (HY000): Can't connect to MySQL server on '<server-ip>' (110) I've added the user to mysql as 'user'@'*' and 'user'@'localhost'. skip-networking in this server is set to false and the bind-address is commented out in my.cnf. I've also attempted to open port 3306 in iptables using the following command: /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT

Access mysql remote database from command line

本秂侑毒 提交于 2019-11-27 02:44:31
I have a server with Rackspace. I want to access the database from my local machine command line. I tried like: mysql -u username -h my.application.com -ppassword But it gives an error: ERROR 2003 (HY000): Can't connect to MySQL server on 'my.application.com' (10061) What causes this error and how can I connect to the remote database? Venkat M To directly login to a remote mysql console, use the below command: mysql -u {username} -p'{password}' \ -h {remote server ip or name} -P {port} \ -D {DB name} It will take you to the mysql console directly by switching to the mentioned database. 31-07

Trying to connect to remote MySQL host (error 2003)

∥☆過路亽.° 提交于 2019-11-26 14:19:27
问题 I have a MySQL instance running on a Debian server and I can connect to it locally with no problems. However, I am unable to connect to it remotely. When I try this from my command line I get the following error: ERROR 2003 (HY000): Can't connect to MySQL server on '<server-ip>' (110) I've added the user to mysql as 'user'@'*' and 'user'@'localhost'. skip-networking in this server is set to false and the bind-address is commented out in my.cnf. I've also attempted to open port 3306 in

ERROR 2003 (HY000): Can&#39;t connect to MySQL server on &#39;127.0.0.1&#39; (111)

做~自己de王妃 提交于 2019-11-26 03:49:15
问题 I use the following command: mysql -u root -h 127.0.0.1 -p and the error message is : ERROR 2003 (HY000): Can\'t connect to MySQL server on \'127.0.0.1\' (111) Who can help me to fix it? 回答1: If you are using ubuntu , you have to use the following steps to avoid this error(if there is no replication enabled): run the command vim /etc/mysql/my.cnf comment bind-address = 127.0.0.1 using the # symbol restart your mysql server once. Update In Step 1, if you cannot find bind-address in the my.cnf

Can&#39;t connect to MySQL server error 111 [closed]

只谈情不闲聊 提交于 2019-11-25 23:31:37
问题 I installed mysql server on linux box IP = 192.168.1.100 but when i try to connect to this IP it alway error(111). but use localhost and 127.0.0.1 is OK. beer@beer-laptop# ifconfig | grep \"inet addr\" inet addr:127.0.0.1 Mask:255.0.0.0 inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 beer@beer-laptop# mysql -ubeer -pbeer -h192.168.1.100 ERROR 2003 (HY000): Can\'t connect to MySQL server on \'192.168.1.100\' (111) beer@beer-laptop# mysql -ubeer -pbeer -hlocalhost Welcome to the