Get the App
SLTechnology News&Howtos  ›  Database  › 

The method of creating read-only users by mysql

Shulou Source: shulou.com Published: 2022-06-01 02:46:13 10月03日 Update

Xiaobian to share with you mysql create read-only user method, I hope you read this article after the harvest, let us discuss it together!

mysql add read-only user methods: 1, use the existing root user login to Mysql;2, create a user, and authorize SELECT query permissions, authorization remote access permissions;3, refresh mysql permissions, so that user creation, authorization takes effect.

mysql add read-only users:

1. Log in to Mysql using the existing root user.

mysql -uroot -p

2. Create a user, and authorize SELECT query permissions, authorize remote access permissions, note that username/password in the command refers to the username password, please specify your own. To restrict Mysql access to this user by specifying only IP, change % to have IP.

GRANT SElECT ON *.* TO 'username'@'%' IDENTIFIED BY "password";

3. Refresh mysql permissions to enable user creation and authorization.

After reading this article, I believe you have a certain understanding of mysql's method of creating read-only users. If you want to know more about it, welcome to pay attention to the industry information channel. Thank you for reading!

Tags: Users permissions methods articles queries logins commands done passwords more user names knowledge industry information information channels channels restrictions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn macOS Docker Redmi Huawei