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

A brief Analysis of MYSQL user name, Authorization, permission, etc.

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

Share

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

This article mainly tells you a brief analysis of MYSQL user name, authorization, authority and so on. You can look up the relevant professional terms on the Internet or find some related books to supplement them. Here, we will not dabble in, go straight to the topic, and hope to bring you some practical help.

/ * 2016-5-5 COLLATE MySQL-hastily read the "SQL complete Manual" and began to learn MYSQL grammar-- and stay in bed for half a month, bored, / * choose the database character set and database proofreading rules: if CHARACTER SET X and COLLATE Y are specified, then use character set X and proofreading rule Y. If CHARACTER SET X is specified and COLLATE Y is not specified, the default proofreading rules for CHARACTER SET X and CHARACTER SET X are adopted. Otherwise, the CVM character set and server proofreading rules are used. If the table character set and proofing rules are not specified in the CREATE TABLE statement, the database default character set and proofing rules are used as default values. * /-- grant select,update,insert on mysql.* to guest@localhost indentified by 'guest123' reported an error. Before GRANT, a user is required to actually exist. Create a user who logs in locally, and the login password is guest123 (is the login password the user password itself? Next, to experiment) create user 'guest'@'localhost' identified by' guest123'-- creates the database guest with the character set of UTF-8, and the proofreading rule is utf8_bincreate database guest default character set utf8 collate utf8_bin--2016.5.16 postscript:-- MySQL5.6 has been changed to utf8_general_ci And the proofreading rules generally do not need to be specified, and the default character set is for a response proofreading rule-- give the permission of insert,update,select to the guestgrant insert,update,select on mysql.* to 'guest'@'localhost'-- at the time of local login to withdraw the insert,update,select permission of the guest at the time of local login revoke insert,update,select on mysql.* from' guest'@'localhost'-- will insert,update Select grants permissions to guest logged in locally and allows it to re-authorize whether the password defined by the grant insert,update,select on mysql.* to 'guest'@'localhost' with grant option-- experiment identified by statement is a login password or a user password. Create user' guest1'@'localhost'-- does not identified-- to query whether the authentication_string field of the User table in the mysql library is empty use mysql. Select authentication_string from user where user = 'guest1'

The query result is shown in the figure and has no content.

Select authentication_string from user where user = 'guest'

The result of the query with a password is shown in the figure, with an encrypted code

MYSQL user name, authorization, permissions and other brief analysis of the first to tell you here, for other related issues you want to know can continue to pay attention to the industry information. Our section will capture some industry news and professional knowledge to share with you every day.

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