"Mysql" modifies the root password and creates an account with the same privileges as root

Source: Internet
Author: User
Tags mysql command line

You may want to change the root password because you are not able to replace the server password of the network project with the MySQL database password on the server, and you may replace the ctrl+h with the other database-independent fields. This has led to a more non-starter project.

In addition, in order to have a local and root-like account to participate in testing, do small demo, so also need to create a local with the same permissions as root account.

First you have to open the MySQL command line client.



First, modify the original installation of the root account password

Similarly, you can change the password of other accounts,

Enter the following statement in the command line:

UPDATE mysql.user SET password=password (' New password ') WHERE user= ' root '; FLUSH privileges;


Second, create an account with the same privileges as root

Enter the following statement in the command line:

CREATE USER ' account ' @ '% ' identified by ' password '; GRANT all privileges on * * to ' account ' @ '% ' identified by ' password ' with GRANT OPTION max_queries_per_hour 0 Max_connections_per_hou R 0 Max_updates_per_hour 0 max_user_connections 0;



"Mysql" modifies the root password and creates an account with the same privileges as root

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.