MySQL is not accessible via remote machine by default, remote access can be turned on by the following configuration
On the MySQL server side:
Execute mysql command into MySQL command mode,
SQL code
- mysql> use mysql;
- MySQL > grant all on *.* to [ Email protected] '% ' identified by ' admin ' with grant option ;
- #这句话的意思 computers that allow any IP address ( % that's what it says) Use the admin account and password (admin) to access this mysql server
- #必须加类似这样的帐户 to log on remotely.
mysql> use mysql;mysql> grant all on * * to [e-mail protected] '% ' identified by ' admin ' with GRANT OPTION; #这句话的意思, allow Any IP address (above the percent of this meaning) of the computer with the admin account and password (admin) to access the MySQL server# must be similar to such an account before you can log on remotely. The root account cannot be logged on remotely and can only be logged on locally
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
How to set up MySQL remote access