connecting to mysql server on another PC in LAN

前端 未结 10 863
[愿得一人]
[愿得一人] 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:28

    You should use this:

    >mysql -u user -h 192.168.1.2 -P 3306 -ppassword
    

    or this:

    >mysql -u user -h 192.168.1.2 -ppassword
    

    ...because 3306 is a default port number.

    mysql Options

提交回复
热议问题