In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the method of allowing remote clients to connect to the MySQL server, which can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
When trying to connect to a remote mysql server from a client system, we often encounter the following problem: the remote client is not allowed to access the mysql server, as shown below.
# mysql-h 192.168.1.10-u root-pEnter password: [output] ERROR 1130 (HY000): Host '192.168.1.12' is not allowed to connect to this MySQL server
This is because if the client system does not have permission to connect to the mysql server. By default, the mysql server does not allow any remote client connections.
(recommended: MySQL tutorial)
Allow MySQL client connections:
Allow the client system to connect to the mysql server. Log in to the remote mysql server using ssh, and then log in to the mysql server locally. Now use the following command to allow remote clients. For example, if the IP of the remote client is 192.168.1.12 and you try to connect through the MySQL root account.
[the following command needs to be run on the mysql server]
# mysql-u root-pEnter password:mysql > GRANT ALL ON *. * to root@'192.168.1.12' IDENTIFIED BY 'new-password';mysql > FLUSH PRIVILEGES;mysql > quit
A new account has been successfully created in the MySQL server to connect from the specified client system.
Let's try to connect from the client system.
# mysql-h 192.168.1.10-u root-p [Sample Output] Enter password:Welcome to the MySQL monitor. Commands end with; or g.Your MySQL connection id is 27Server version: 5.1.69 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or' h' for help. Type 'c' to clear the current input statement.mysql > Thank you for reading this article carefully. I hope it will be helpful for everyone to share the method of allowing remote clients to connect to the MySQL server. At the same time, I also hope that you will support it, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you!
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.