In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There are two main steps to implement remote login:
(1) grant remote login rights to mysql users (table modification or authorization method)
(2) the firewall opens port 3306.
(1) granting login authority
Mysql-u root-p enter the password into the mysql.
Authorization law
Create an account test and authorize it. The password is password:
Grant all on *. * to test@'127.0.0.1' identified by "password"
Table change method
1. Switch to the mysql database:
USE mysql
two。 Modify the permissions of test:
UPDATE user SET host ='% 'WHERE user =' test'
%: any ip can be accessed
3. Check whether the user table has been modified successfully:
SELECT user,host FROM user
4. Update the database:
Flush privileges
(2) opening port 3306
1. View firewall status:
[root@study ~] # firewall-cmd-state # # results are displayed as running or not running
two。 Open the port:
# # zone-- scope # # add-port=80/tcp-- add a port in the format: Port / communication protocol # # permanent-- permanently effective. Firewall-cmd-- zone=public-- add-port=3306/tcp-- permanent expires after restart without this parameter
3. Restart the firewall
Firewall-cmd-reload
Use firewall-cmd-- help to view the help file to see more commands.
The above are the details of mysql remote login under centos, please pay attention to other related articles!
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.