In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to achieve remote access in Mysql". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to achieve remote access in Mysql".
The database installed on the local machine can be accessed by the local program, but the colleague's machine is unable to connect and access. It is found that the mysql database does not open remote access.
The solution is as follows:
My database mysql root user password = cx, enter mysql-u root to enter mysql
There are three ways to allow mysql remote access:
A, change the table.
Java code
Use mysql
Update user set host ='% 'where user =' root'
Select host, user from user
B, authorization.
For example, let root users connect to the mysql server from any host.
Java code
GRANT ALL PRIVILEGES ON *. * TO IDENTIFIED BY 'cx' WITH GRANT OPTION
If you allow user test to connect to the mysql server from a host with an ip of 10.40.207.17 and use cx as the password
Java code
GRANT ALL PRIVILEGES ON *. * TO IDENTIFIED BY 'cx' WITH GRANT OPTION
LUSH RIVILEGES
C: run on the machine where mysql is installed:
/ / enter the MySQL server
Java code
Mysql-h localhost-u root
/ give any host permission to access data
GRANT ALL PRIVILEGES ON *. * TO WITH GRANT OPTION
/ / make the changes effective
FLUSH PRIVILEGES
/ / exit the MySQL server
EXIT
Thank you for your reading, the above is the content of "how to achieve remote access in Mysql". After the study of this article, I believe you have a deeper understanding of how to achieve remote access in Mysql, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.