How to make mysql accept connections externally

前端 未结 3 1973
花落未央
花落未央 2021-01-06 13:29

I have a VPS and I want to make mysql DB accept connection externally (from my PC for instance). I have Debian Linux installed on the server. I checked some tutorials online

3条回答
  •  礼貌的吻别
    2021-01-06 14:12

    You also have to change the bind-address to the external ip of your VPS machine (ipconfig would help).

    And grant access from your PC. Connect to the database from localhost with root privilege and do:

    grant all privilege on *.* to `username`@`your-pc-id` identified by 'your-password'
    

    For more information look through MySQL grant documentation.

提交回复
热议问题