Mysql Error 2003 Ubuntu
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 error 2003 (hy000): can't connect to mysql server on (113) Us Learn more about Stack Overflow the company Business Learn more about hiring error 2003 hy000 can t connect to mysql server on 110 developers or posting 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 111 Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 2003 (HY000): Can't connect to error 2003 (hy000): can't connect to mysql server on (60) MySQL server on '127.0.0.1' (111) up vote 69 down vote favorite 18 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? mysql mysql-error-2003 share|improve this question edited May 21 '15 at 3:21 hello_there_andy 1,169837 asked Nov 4 '09 at 12:37 Charlie
Error 2003 (hy000): Can't Connect To Mysql Server On Remote
Epps 1,07152333 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 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 127 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 F
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
Error 2003 (hy000): Can't Connect To Mysql Server On (61)
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation error 1130 (hy000): host is not allowed to connect to this mysql server Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just error 2003 can't connect to mysql server like you, helping each other. Join them; it only takes a minute: Sign up ERROR 2003 (HY000): Can't connect to MySQL server (111) up vote 19 down vote favorite 3 This question is related to the following questions: http://stackoverflow.com/questions/1673530/error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111 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 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 http://stackoverflow.com/questions/11758339/error-2003-hy000-cant-connect-to-mysql-server-111 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 mysql-error-2003 share|improve this question edited Apr 11 '14 at 12:35 Ward Muylaert 449319 asked Aug 1 '12 at 11:33 Nick Ruiz 65731125 1 You don't have skip-networking in your my.cnf, do you? –Michael Berkowski Aug 1 '12 at 12:18 And telnet 192.168.1.3 3306. If it opens any sort of prompt, the the port is listening and accepting connections. –Micha
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? https://www.digitalocean.com/community/questions/connect-error-2003-can-t-connect-to-mysql-server-on-111 You previously marked this answer as accepted. Are you sure you want to unaccept it? Yes, I'm sure. Sign Up Log In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: seabey Subscribe Subscribed Share 0 Connect Error (2003) Can't connect to error 2003 MySQL Server on '' (111) October 7, 2014 25.5k views Ubuntu 14.04 x32. Installed php, phpmyadmin, apache, mysql. Created database, upload my website files and I'm getting this error message: Connect Error (2003) Can't connect to MySQL server on 'myipaddress' (111) I tried these solutions: 1) In etc>mysql>my.cnf change these line: secure.bind-address=127.0.0.1 to secure.bind-address=myipaddress Didn't work. 2) mysql> GRANT ALL connect to mysql ON mydbname.* TO root@'myipaddress' -> IDENTIFIED BY 'mymysqlpassword'; It did'nt work, too. What can i do sometimes? 1 comment 0 DarkSaint October 7, 2014 Post a pastebin link to the connection string in your code. Log In to Comment Leave a Comment Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below. Log In to Comment 2 Answers 0 seabey October 7, 2014 Here my connection codes: Here Reply Log In to Comment 0 kamaln7 MOD October 7, 2014 Is MySQL running? sudo ps wwaux | grep -i sql If that does not output anything, try starting the MySQL service: sudo service mysql start Also, what hostname/port is MySQL listening on? sudo netstat -plutn | grep -i sql Reply Log In to Comment 0 seabey October 7, 2014 This is first query's output: sudo ps wwaux | grep -i sql mysql 17375 0.1 7.3 327804 37084 ? Ssl 12:21 0:00 /usr/sbin/mysq d root 17682 0.0 0.1 4680 836 pts/0 S+ 12:27 0:00 grep --color=auto -i