Mysql account problems

Source: Internet
Author: User

MysqlIn general, the database is still a relatively easy-to-use database system, which is well received by many users. However, when there are problems with easy-to-use products, we will take the Mysql database as an example below, this section describes the account issues in Mysql.

Including logon to Mysql5.0 from old clients

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

Mysql> set password for 'some _ user' @ 'some _ host' = OLD_PASSWORD ('mypass ');

You can add new users by issuing the GRANT statement:

Shell> mysql -- user = root mysql

Mysql> grant all privileges on *. * TO monty @ localhost

Identified by 'something' with grant option;

Mysql> grant all privileges on *. * TO monty @ "%"

Identified by 'something' with grant option;

Mysql> grant reload, process on *. * TO admin @ localhost;

Mysql> grant usage on *. * TO dummy @ localhost;

These GRANT statements install three new users:

Monty

A complete super user who can connect to the server from anywhere, but must use a password ('something' to do this. Note: You must issue a GRANT statement to monty @ localhost and monty @ "%. If we add a localhost entry, the entry created by mysql_install_db for the anonymous user entry of localhost takes priority when we connect from the local Host, because it has a more specific Host field value, therefore, the user table is arranged in the order of users.

Admin

Users who can connect from localhost without a password and are granted reload and process management permissions. This allows you to run the mysqladmin reload, mysqladmin refresh, mysqladmin flush-* commands, and mysqladmin processlist commands. No database-related permissions are granted. They can GRANT permissions in the future by issuing another GRANT statement.

Dummy

You do not need a password to connect to a user, but you can only access the user from the local host. The global permission is set to 'n' -- the USAGE permission type allows you to set a user without permission. It assumes that you will grant database-related permissions in the future.

I am going to explain the account issues in the Mysql database. I hope you can learn from the above.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.