[Mysql] Change the root password and create an account with the same permissions as root, mysqlroot
You may need to change the root password because it must work with the Mysql database password on the server. You cannot always use Ctrl + H to replace the server password of the network project for each update, otherwise, it may be replaced with other database-independent fields. This makes the project even worse.
In addition, in order to have an account with the same permissions as the root account to participate in the test and make some demos, you also need to create an account with the same permissions as the root account.
First, you must open the MySQL Command Line Client Command Line.
1. Modify the password of the root account during the original installation
Similarly, you can change the passwords of other accounts,
Enter the following statement in the command line:
UPDATE mysql. user SET password = PASSWORD ('new password') WHERE User = 'root'; flush privileges;
2. Create an account with the same permissions 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_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;