The following articles mainly introduce the operation process of enabling remote connection for MySQL database. In fact, it is not difficult to start the actual operation steps of remote connection for MySQL database, today, we want to describe the process of starting a remote connection to the MySQL database.
1. d: \ MySQL \ bin \> MySQL-h localhost-u root
In this way, you can access the MySQL server.
- MySQL> update user set host = '%' where user = 'root ';
- MySQL> select host, user from user;
2. MySQL> grant all privileges on *. * TO 'root' @ '%' identified by 'mypassword' WITH GRANT OPTION
Grant data access permissions to any host
3. MySQL> FLUSH PRIVILEGES
Modification takes effect
4. MySQL> EXIT
Log out of the MySQL server
In this way, you can log on to any other host as the root user!
The above content is an introduction to enabling remote connection to the MySQL database. I hope you will get some benefits.