Error 2003 Hy000 Can
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site error 2003 hy000 can't connect to mysql server on 110 About Us Learn more about Stack Overflow the company Business Learn more about error 2003 hy000 can't connect to mysql server on localhost 10061 hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Error 2003 Hy000 Can't Connect To Mysql Server On 113
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 2003 (HY000):
Error 2003 Hy000 Can't Connect To Mysql Server On 111
Can't connect to MySQL server (111) up vote 19 down vote favorite 3 This question is related to the following questions: Can't connect to MySQL server error 111 Trying to connect to remote MySQL host (error 2003) I am configuring a new MySQL (5.1) server on my local machine. I need to provide remote access to the database. I did the following steps: Comment bind-address error 2003 hy000 mysql windows in my.cnf: # bind-address = 192.168.1.3 Grant privileges: GRANT ALL PRIVILEGES ON *.* TO 'nickruiz'@'%' IDENTIFIED BY PASSWORD 'xxxx'; Set port forwarding on router (TCP and UDP, port 3306, 192.168.1.3) Configure iptables for firewall sudo iptables -I INPUT -p udp --dport 3306 -j ACCEPT sudo iptables -I INPUT -p tcp --dport 3306 --syn -j ACCEPT sudo iptables-save Restart mysql server sudo /etc/init.d/mysql restart When testing, I get the following: LAN: mysql -h 192.168.1.3 -u nickruiz -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 95 Server version: 5.1.63-0ubuntu0.11.04.1 (Ubuntu) Remote: mysql -h 1xx.xx.4.136 -u nickruiz -p ERROR 2003 (HY000): Can't connect to MySQL server on '1xx.xx.4.136' (111) Clearly there's something wrong that's preventing me from being able to use my global IP address. Notes: I've tried testing the remote connection on the same machine and also via SSH from a remote machine. I'm not sure if my ISP has given me a static IP. Any ideas? Update: telnet doesn't seem to be working. telnet 192.168.1.3 3306 Trying 192.168.1.3... Connected to 192.168.1.3. Escape character is '^]'. E 5.1.63-0ubuntu0.11.04.1,0g8!:@pX;]DyY0#\)SIConnection closed by foreign host. mysql linux remote-access mys
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Error 2005 Hy000
About Us Learn more about Stack Overflow the company Business Learn more about error 2002 hy000 hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join error 2006 hy000 the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 2003 (HY000): Can't http://stackoverflow.com/questions/11758339/error-2003-hy000-cant-connect-to-mysql-server-111 connect to MySQL server on 'hostname' (111) up vote 7 down vote favorite Thanks in advance for your help. I am facing an issue with mysql server which is the title of this topic, by using the command: mysql -u myuser -pmypass -h `hostname` db_name I get the error ERROR 2003 (HY000): Can't connect to MySQL server on 'hostname' (111) So I checked the my.cnf file http://stackoverflow.com/questions/18083045/error-2003-hy000-cant-connect-to-mysql-server-on-hostname-111 and I have no lines with "bind address" and "skip-networking" although I tried adding them and restarting which did not change anything. Besides that there is no error in the sql logs, and we can (with HeidiSQL) connect to the server remotely knowing that the user is myuser"@"%. Mysql listens on the port 3306, so it's ok there Also, users created with with @'localhost', works fine with the command line (without the -h option). What is more intriguing is that other servers that look exactly the same work both locally and remotely with the first command... The server runs with CentOS 6.2 So if anyone has an idea on this matter I would be glad to hear it P.S : It's my first time posting here, so if there are formatting issues, please forgive me mysql networking centos share|improve this question edited Aug 13 '13 at 11:55 asked Aug 6 '13 at 14:29 ASettouf 36113 hostname is passed literally? If yes, replace it with the address of your server (or localhost) –Alma Do Aug 6 '13 at 14:33 1 No it is passed between "grave accent" (thus it is the u
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow http://superuser.com/questions/606267/error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111-despite the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. http://www.woblag.com/2012/06/mysql-error-2003-hy000-cant-connect-to.html Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ERROR 2003 (HY000): Can't connect error 2003 to MySQL server on '127.0.0.1' (111) [despite commenting out bind-address & skip-networking] up vote 0 down vote favorite Okay, so disclaimer: I'm an absolute mysql noob. Gimme any other development type area and I'm fine. So, I just started using Ubuntu 12.04 an setup mysql. Never really used localhost since we have a staging environment at work that I usually access. However, a client had a really large DB dump that I needed error 2003 hy000 to access and I didn't want to put in on the server for everyone to deal with so I tried to use localhost Whenever I try to access it through MySQL Workbench I get an error so I had a look at a couple of articles online and tried a couple of different things but if I run the following command in the terminal, I get an error: mysql -u root -p -h 127.0.0.1 Produces the following ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111) However, if I access mysql like so: mysql -u root -p and then enter my password, I can access mysql fine. Here's what /etc/mysql/my.cnf contains at the moment (I've tried looking for other versions of this file). I've left out all the commented out bits for brevity's sake. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 myisam-recover = BACKUP query_cache_limit = 1M query_cache_size = 16M log_error = /var/log/mysql/error.log expire_logs_days = 10 max_binlog_size = 100M [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] [isamchk] key_buffer = 16M !includedir /etc/mysql/
while setting up a testing mysql environment and attempting to access it from a remote host. Usually it's the simple things that are overlooked, so here's how to resolve the error: ERROR 2003 (HY000): Can't connect to MySQL server on 'xx.xx.xx.xx' (111) The first thing we can check is to see if the user from the remote host is allowed. 1. Login as root on mysql server mysql -u root -p 2. Select database and show users. select * from mysql.user\G **A vertical list will be displayed. Look at the first two fields for each entry. If the user is only allowed to connect from localhost, this may be the problem. Example: Host: localhost User: mydbuser A user will have to be defined with the same parameters as mydbuser for the remote host (or hosts) Here's where your documentation will come in handy (or you can hope the old query exists in the mysql buffer!) 3.Allow remote hosts to connect grant select,insert,update,delete,create,drop,index,alter on mydbname.* to mydbuser@'192.168.1.%' identified by 'mydbpassword'; flush privileges; Note: if you only want to allow a certain host, specify the IP instead of the wildcard. The second issue that may cause this error is a MySQL configuration. 1. Open MySQL config file nano/etc/my.cnf 2. Ensure that the following are commented out. #skip-external-locking #skip-networking #bind-address = xx.xx.xx.xx Save and exit 3. Restart mysql service service mysqld start The third issue that may contribute to this error may be the security configuration rejecting incoming requests on the server. 1. Login as root on db server 2. Add rule to iptables /sbin/iptables -A INPUT -i eth0 -s 192.168.1.0/24 -p tcp --destination-port 3306 -j ACCEPT ** this grants access to the entire subnet, use a specific IP where applicable. service iptables save 3. Restartiptables service service iptables restart Test from remote host by using the following: mysql -h 192.168.my.dbip -u mydbuser -p -noveck Posted by noveck at 1:15 PM Email ThisBlogThi