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 modifying mysql login permission

2025-01-17 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 modifying the login authority of mysql, which has certain reference value and 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.

The way to modify mysql login permissions is to first log in to mysql;, then modify the user table of the mysql library, change the host entry from localhost to [%], and finally change the corresponding ip.

How to modify mysql login permissions:

1. Log in to mysql

Mysql-u root-p

2. Modify the user table of the mysql library and change the host entry from localhost to%. % here means that arbitrary host access is allowed. If only one ip access is allowed, it can be changed to the corresponding ip. For example, the localhost can be changed to 192.168.1.123, which means that only 192.168.1.123 ip of the local area network is allowed to access the mysql remotely.

Mysql > use mysql; mysql > update user set host ='% 'where user =' root'; mysql > select host, user from user; mysql > flush privileges; Firewall Open Port 3306 Thank you for reading this article carefully. I hope the editor will share the methods and contents of modifying mysql login permissions to help everyone. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find a detailed solution 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.

Share To

Database

Wechat

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

12
Report