Home >Database >Mysql Tutorial >How to log in to the remote database with mysql?
1.Loginmysql
##2.e mysql;
3.For example, the username and password are root/root.
Do you want to root use root to connect to # from any host ##mysql Server words.
@' 'followed by ip The address is generally localhost or 127.0.0.1 * % means that any ip can be accessed. GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
4.Flush privileges
flush privileges;
If you cannot connect to the remote database, the port may not be open.
Add a new inbound rule to open the port used by mysql (common 3306)
The above is the detailed content of How to log in to the remote database with mysql?. For more information, please follow other related articles on the PHP Chinese website!