Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of CentOS installation MySQL supporting remote connection

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "CentOS installation MySQL support remote connection method", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "CentOS installation MySQL support remote connection method" bar!

After MySQL is installed in the CentOS system, by default, users are not allowed to connect to the database server through non-local connections. Here is the solution:

1. Execute mysql-u root-p mysql,CentOS in the console. The system prompts you to enter the password of the database root user. After entering the password, you will enter the mysql console. The * mysql of this command is the execution command, and the second mysql is the system data name, which is different.

2. Execute GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' MyPassword' WITH GRANT OPTION in the mysql console

FLUSH PRIVILEGES

3. The 'root'@'%'' in the command executed in the mysql console can be understood as follows: root is the user name,% is the host name or IP address, where the% represents any host or IP address, or you can replace it with any other user name or the specified * * IP address; 'MyPassword' is the password assigned to the login database for the authorized user Another point to note is that all the permissions I have here are authorized. You can specify some permissions. For more information on GRANT operation, please see: http://dev.mysql.com/doc/refman/5.1/en/grant.html

4. If you are not at ease, you can execute select host in the mysql console, and user from user; check the contents of the user table.

In this way, we have completed the CentOS system installation MySQL to support remote connections.

Thank you for your reading, the above is the "CentOS installation MySQL support remote connection method" content, after the study of this article, I believe you on the CentOS installation MySQL support remote connection method of this problem has a deeper understanding, the specific use of the need for you to practice and verify. 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report