Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the account problems in Mysql?

Shulou Source: shulou.com Published: 2022-05-31 11:48:13 09月30日 Update

This article mainly shows you "what are the account problems in Mysql". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "what are the account problems in Mysql?"

What are the account problems in Mysql?

Including the problem of old clients logging in to Mysql5.0

Since the new version of Mysql5.0 uses md5 encryption, if the client is version 3.5, use the following statement to change the encrypted password

Mysql > SETPASSWORDFOR'some_user'@'some_host'=OLD_PASSWORD ('mypass')

You can add new users by issuing a GRANT statement:

Shell > mysql--user=rootmysql

Mysql > GRANTALLPRIVILEGESON*.*TOmonty@localhost

IDENTIFIEDBY'something'WITHGRANTOPTION

Mysql > GRANTALLPRIVILEGESON*.*TOmonty@ "%"

IDENTIFIEDBY'something'WITHGRANTOPTION

Mysql > GRANTRELOAD,PROCESSON*.*TOadmin@localhost

Mysql > GRANTUSAGEON*.*TOdummy@localhost

What are the account problems in Mysql?

These GRANT statements install 3 new users:

Monty

A full super user who can connect to the server from anywhere, but must use a password ('something') to do this. Note that we must issue GRANT statements against monty@localhost and monty@ "%". If we add an localhost entry, the anonymous user entry for localhost will take precedence over the entry created by mysql_install_db when we connect from the local host, because it has a more specific Host field value, so it comes earlier in user table order.

Admin

Users who can connect from localhost without a password and are granted reload and process administrative rights. This allows the user to execute mysqladminreload, mysqladminrefresh, and mysqladminflush-* commands, as well as mysqladminprocesslist. No permissions are granted to the database. They can authorize it later by issuing another GRANT statement.

Dummy

You can connect to a user without a password, but only from the local host. Global permissions are set to the 'N'--USAGE permission type' which allows you to set up a user without permission. It assumes that you will grant permissions related to the database in the future.

The above is all the contents of the article "what are the account problems in Mysql?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Users questions permissions accounts statements content passwords entries articles hosts clients clients data databases encryption learning help no global can be passed through Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Shulou Tech Info Docker Microsoft