Error 2003 Hy000 Cannot Connect To Mysql
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 About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting error 2003 hy000 can't connect to mysql server on 110 ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the error 2003 hy000 can't connect to mysql server on 113 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: error 2002 hy000 can t connect to local mysql server Sign up ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111) up vote 68 down vote favorite 16 I use the following command: mysql -u root -h 127.0.0.1 -p and the error message is : ERROR 2003 (HY000): Can't error 2003 (hy000): can't connect to mysql server on (60) connect to MySQL server on '127.0.0.1' (111) Who can help me to fix it? mysql mysql-error-2003 share|improve this question edited May 21 '15 at 3:21 hello_there_andy 1,164837 asked Nov 4 '09 at 12:37 Charlie Epps 1,06652333 2 Is mysql daemon running? Have yot got a firewall? Can you telnet to mysql the default port is 306 so - telnet localhost 3306 –Mark Nov 4 '09 at 12:42 the mysql daemon is running. I'm sure. –Charlie Epps Nov 4 '09
Error 2003 (hy000): Can't Connect To Mysql Server On Remote
at 12:43 Is it just me or if you're connecting to the local mysql server you don't need to specify the host e.g. mysql -u root -p should work? –RMcLeod Nov 4 '09 at 14:18 just to make sure, you are trying to connect to the db server locally? –John Kane Jun 10 '11 at 18:30 Error 2003 is detailed here: webyog.com/faq/content/23/15/en/… –Ashwin A Aug 6 '12 at 12:12 | show 1 more comment 13 Answers 13 active oldest votes up vote 126 down vote If you are using ubuntu, you have to use the following steps to avoid this error: 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 file, look for it in /etc/mysql/mysql.conf.d/mysqld.cnf file. share|improve this answer edited Feb 9 at 0:51 Umar Farooq Khawaja 3,0152041 answered Apr 23 '13 at 8:21 Justin Vincent 1,386265 7 Thank you!!! I had been trying to figure this out for a long time! I commented out that line, saved the file, and then ran service mysql restart. And now it works! –Ryan Jan 20 '14 at 17:59 In my case, I had the server's address instead of 127.0.0.1 for bind-address. If this is the case for you, you will need to comment that out as well. –Vlad Schnakovszki Dec 25 '14 at 12:33 1 There
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta
Error 2003 (hy000) Can't Connect To Mysql Server On (10060)
Discuss the workings and policies of this site About Us Learn error 2003 (hy000): can't connect to mysql server on (61) more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us error 2003 can't connect to mysql server Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like http://stackoverflow.com/questions/1673530/error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111 you, helping each other. Join them; it only takes a minute: Sign up Trying to connect to remote MySQL host (error 2003) up vote 22 down vote favorite 4 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 http://stackoverflow.com/questions/5713808/trying-to-connect-to-remote-mysql-host-error-2003 remotely. When I try this from my command line I get the following error: ERROR 2003 (HY000): Can't connect to MySQL server on '
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 http://superuser.com/questions/606267/error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111-despite Stack Overflow 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 http://serverfault.com/questions/446843/error-2003-hy000-cant-connect-to-mysql-server-on-111 and power users. 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 connect to ERROR 2003 (HY000): Can't connect 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 t connect to really large DB dump that I needed 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 =
Start 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 the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. 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 to MySQL server on (111) up vote 1 down vote favorite I am unable to connect to on my ubuntu installation a remote tcp/ip which contains a mysql installation: viggy@ubuntu:~$ mysql -u user.name -p -h xxx.xxx.xxx.xxx -P 3306 Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111) I commented out the line below using vim in /etc/mysql/my.cnf: # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. #bind-address = 127.0.0.1 Then I restarted the server: sudo service mysql restart But still I get the same error. This is the content of my.cnf: # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysql