Home > Article > Backend Development > phpstudy allows remote access to mysql database setting method
This article mainly shares with you the setting method of phpstudy allowing remote access to mysql database. I hope it can help everyone.
Recommended mysql video tutorials: "mysql tutorial"
1. First use the command line in the server (open the phpstudy interface->lower right corner Other menu options->MySQL tools->MySQL command line)
Log in to mysql: mysql -u root -p password (if the mysql initial account and password are both root)
2. Execute use mysql;
3. Execute grant all privileges on *.* to root@'%' identified by 'password';
4. Execute flush privileges;
After these steps are set up, we can use mysql management tools, such as navicat, to test the connection. If the connection is unsuccessful, we need to open port 3306 in the security group.
The above is the detailed content of phpstudy allows remote access to mysql database setting method. For more information, please follow other related articles on the PHP Chinese website!