How to set up a remote connection mysql
- Original
- |
- Views: 2726
- |
- Updated: 2019-01-22 17:32
mysql default is not allowed to be connected remotely, only the local machine can connect, then how are we to allow its kind set up Mysql remote connectivity it in detail as follows
Method / Step
-
First we see the mysql version that can be installed on Linux, use rpm -qa | grep mysql can view the installed version
-
View to later use yum install -y mysql-server mysql mysql-deve code to install mysql, finally appeared complete the installation is successful
-
Then we start the Mysql service, used here to start service mysqld start, determined to see the two represented a successful start
-
Then landing mysql, use mysql -u root -p, and then enter the login password, you can log indicate available
-
Then began to open to allow remote connections, first check the firewall using netstat -ntpl view to find 3306 port, if there is no need to add
-
Then log in mysql, use grant all privileges on * * to 'root' @ '%' identified by 'your password' with grant option;. Remote Access permissions, remember to refresh service
-
Then we use Navicat on other machines can remotely access the machine
END
Precautions
-
Note should be noted that the most important thing is the sixth step, try not to knock hand, fallible
Reference to this article: https://jingyan.baidu.com/article/60ccbceb93c7f364cbb1974f.html