In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "mysql can not be connected to the common failures and reasons", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "mysql can not connect what are the common failures and reasons" this article.
=
Failure condition: unable to connect to mysql
Error message: ERROR 2003 (HY000): Can't connect to MySQL server on 'hostxxxxx' (10061)
Reason: the mysqld database service did not start.
Check: in the task manager of windows, or under unix/linux, ps-aux | grep mysql to take a look. Confirm that the service has been started.
Processing: starting the mysqld service
=
=
Failure condition: unable to connect to mysql
Error message: ERROR 1130: Host xx.xx.xx.xx is not allowed to connect to this MySQL server
Reason: the mysql server does not give this client permission to connect remotely.
Check: query the mysql server locally whether the host corresponding to the user table in the mysql library contains the IP of the client machine (% does not restrict IP to allow remote connections).
Treatment: modify the user table under the mysql library: update user set host ='% 'where user =' XXX';flush privileges
=
Your user does not use a root account, or your root account does not grant login permission. You need to use it.
GRANT ALL PRIVILEGES ON *. * TO 'myuser'@'%' IDENTIFIED BY' mypassword' WITH GRANT OPTION
Authorization
=
Failure condition: unable to connect to mysql
Error message: ERROR 2003 (HY000): Can't connect to MySQL server on 'hostxxxxx' (10061)
Reason: mysqld client and server ports are inconsistent.
Check: the service port under the my.ini setting, especially if the client is inconsistent with the remote server port, it is easy to have problems.
Processing: starting the mysqld service
=
Failure condition: unable to connect to mysql
=
Error message: ERROR 2003 (HY000): Can't connect to MySQL server on 'hostxxxxx' (10061)
Reason: the mysqld database service did not start.
Check: in the task manager of windows, or under unix/linux, ps-aux | grep mysql to take a look. Confirm that the service has been started.
Processing: starting the mysqld service
=
Error message: ERROR 1130: Host xx.xx.xx.xx is not allowed to connect to this MySQL server
Reason: the mysql server does not give this client permission to connect remotely.
Check: query the mysql server locally whether the host corresponding to the user table in the mysql library contains the IP of the client machine (% does not restrict IP to allow remote connections).
Treatment: modify the user table under the mysql library: update user set host ='% 'where user =' XXX';flush privileges
=
Error message: ERROR 1045 (28000): Access denied for user 'usera'@'localhost' (using password:YES)
Reason: user account has not been created
Check: after logging in as administrator ROOT, show grants for 'usera'@'localhost'; or select user from mysql.user; confirms whether the user account exists.
Processing: create a user account.
=
Error message: ERROR 2003 (HY000): Can't connect to MySQL server on 'hostxxxxx' (10061)
Reason: mysqld client and server ports are inconsistent.
Check: the service port under the my.ini setting, especially if the client is inconsistent with the remote server port, it is easy to have problems.
Processing: starting the mysqld service
=
Error message: ERROR 2002 (HY000): Can't connect to local MySQL server server through socket'/ var/lib/mysql/mysql.sock' (111)
Reason: the mysql.sock of mysqld is not in the corresponding position.
Deal with:
1. Check / etc/rc.d/init.d/mysql status first to see if it starts.
two。 Change permission chown-R mysql:msyql / var/lib/mysql
3. Modify / etc/my.cnf (Note: stop the database first)
[mysqld] datadir=/usr/local/mysql/data socket=/var/lib/mysql/mysql.sock [mysql.server] user=mysql basedir=/usr/local/mysql [client] socker=/var/lib/mysql/mysql.sock
4. Start the database
=
=
Commonly used inspection steps.
1. PING hostname or PING 189.xx.xx.xx confirms that there is no problem with server IP layer communication. If the PING general rule continues (2), if the PING is not available, seek the assistance of network experts.
2. TELNET hostname 3306 confirms that there is no problem with server TCP layer communication. (your port number may not be 3306), if the general rule continues, if not, please check whether mysqld is already running and the firewall is blocking the port.
3. Check user permissions, show grants...
The above is all the contents of the article "what are the common failures and reasons why mysql cannot be connected?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.