How to solve the problem MySQL password

How to set up a remote connection mysql

Listen to the voice
  • Original
  • |
  • Views: 2726
  • |
  • Updated: 2019-01-22 17:32
  • How to set up a remote connection mysql 1
  • How to set up a remote connection mysql 2
  • How to set up a remote connection mysql 3
  • How to set up a remote connection mysql 4
  • How to set up a remote connection mysql 5
  • How to set up a remote connection mysql 6
  • How to set up a remote connection mysql 7
Read the step by step

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

Tools / materials

 
  • mysql
  • linux
  • Navicat

Method / Step

 
  1.  

    First we see the mysql version that can be installed on Linux, use rpm -qa | grep mysql can view the installed version

    How to set up a remote connection mysql
  2.  

    View to later use yum install -y mysql-server mysql mysql-deve code to install mysql, finally appeared complete the installation is successful

    How to set up a remote connection mysql
  3.  

    Then we start the Mysql service, used here to start service mysqld start, determined to see the two represented a successful start

    How to set up a remote connection mysql
  4.  

    Then landing mysql, use mysql -u root -p, and then enter the login password, you can log indicate available

    How to set up a remote connection mysql
  5.  

    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

    How to set up a remote connection mysql
  6.  

    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

    How to set up a remote connection mysql
  7.  

    Then we use Navicat on other machines can remotely access the machine

    How to set up a remote connection mysql
    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

Guess you like

Origin www.cnblogs.com/6zdk/p/12105492.html