In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 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 mysql remote connection port and modification, which has a certain reference value, friends who need can refer to it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
The method of mysql remote connection port and modification: first go to the directory of the mysql configuration file, edit the file; then modify the port number and allow remote binding, and keep it; then restart the mysql service; finally, open remote access.
Mysql remote connection port and modify method:
1. Enter the directory of the mysql configuration file
Cd / etc/mysql/mysql.conf.d/
2. Edit the mysqld.cnf file
Vi mysqld.cnf
3. Modify the port number and allow remote binding
Change the value of bind-address to: 0.0.0.0 or comment out this line
4. Save after modification
Note: at the beginning of my configuration, the permissions of the file were set to 777. But after restarting the service, the port has not changed!
When the permission of the file is changed to 644, the mysql service is restarted and the port is changed.
5. Restart the mysql service
/ etc/init.d/mysql restart
6. Log in to mysql
Use the command: mysql-u root-p
7. Enter the command to view the port number:
Show global variables like 'port'
8. Enable remote access (increase the number of users who allow remote access or allow remote access for existing users. )
Give the SQL account all permissions to access any database on any host (%). The SQL statement is as follows:
The code is as follows:
Grant all privileges on *. * to 'account' @'% 'identified by' password 'with grant option
Refresh the brand new:
Flush privileges
9. Finally restart the mysql service
Thank you for reading this article carefully. I hope the editor will share the mysql remote connection port and modify the method to help everyone. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
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.