How to install MySQL Community Server 5.7.16 in green and achieve remote login, mysql5.7.16
1. Download MySQL Community Server 5.7.16 and install it.
2. Go to the bin directory of the mysql installation directory and Enter cmd in the file address bar and press Enter.
3. Enter the following command:mysqld --initialize-insecure --console
4. Enter the following command:mysqld -install
5.mysql -u root--skip-password
6. alter user 'root' @ 'localhost' IDENTIFIEDBY '123 ';
7. \ quit
8.mysql -h localhost -uroot -p
Installation Complete
Authorize remote Logon
Log on with an Administrator Account
Run the following command:grant all PRIVILEGES on *.* to zhanghao@'%' identified by '123456';
Refresh takes effect: flush privileges;
Command explanation:
All PRIVILEGES indicates that all permissions are granted to the specified user. Here, you can also replace it with a specific permission, for example:
select,insert,update,delete,create,drop
Are separated by commas.
*. * Indicates the table to which the preceding Permission applies. The first * indicates the database, and the last * indicates all tables, grant "Database Name" to all tables of a database. * ", grant permissions to a table in a database as" database name. table name ".
Zhanghao indicates the user you want to authorize. This user can be an existing user or a non-existent user.
Summary
The above section describes how to install the green MySQL Community Server 5.7.16 and implement remote logon. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!