connecting to mysql server on another PC in LAN

前端 未结 10 833
[愿得一人]
[愿得一人] 2020-12-09 07:00

I have mySQL setup in a PC on my local network, how do I connect to it? I also have mySQL installed in this computer (which I want to use to connect to the database).

<
10条回答
  •  庸人自扰
    2020-12-09 07:12

    In Ubuntu Follow these steps:

    1. Set bind-address at /etc/mysql/mysql.conf.d

    Change bind-address = 127.0.0.1 to bind-address = 192.24.805.50 # your IP

    1. Grant permission for the remote machine

      mysql>GRANT ALL PRIVILEGES ON . TO 'root'@'[remoteip]' IDENTIFIED BY 'anypassword' WITH GRANT OPTION;

    2. Then try connect from remote machine

      mysql -u root -h 192.24.805.50 -p

提交回复
热议问题