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

Two ways to add MySQL user settings

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Let's learn about the next two ways to add MySQL user settings. I believe you will benefit a lot after reading it. The text is not in the essence. I hope two kinds of MySQL user settings add methods this short content is what you want.

In mysql, root has the highest user rights, and the permissions are SELECT,INSERT,UPDATE,DELETE,CREATE,DROP, respectively. Here is a brief description of how to separate users.

1. To add an instance of the user, the user name is dc3688 and the password is 123456, and the user is authorized to operate root@host# mysql-u root-p Enter password:* mysql > use mysql for SELECT, INSERT and UPDATE. Database changed INSERT INTO user (host, user, password, select_priv, insert_priv, update_priv) VALUES ('localhost',' guest', PASSWORD ('guest123'),' y 'means yes finally overloads FLUSH PRIVILEGES with the command

2. The way to add users is through the GRANT command of SQL

Root@host# mysql-u root-p

Enter password:***

Mysql > use mysql

Database changed

Mysql > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP

-> ON TUTORIALS.*

-> TO 'dc3688'@'localhost'

-> IDENTIFIED BY '123456'

Both of the above methods can create users for each

After reading this article on two ways to add MySQL user settings, many readers will want to know more about it. For more industry information, you can follow our industry information section.

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