Mysql - connect to remote server using IP address

后端 未结 4 411
时光说笑
时光说笑 2020-12-09 11:35

I am using PHP and MySQL to make a database connection, the only change is that I am trying to access my remote server from my local computer using my server IP address.

4条回答
  •  北海茫月
    2020-12-09 11:57

    1) Check which interface MySQL listen for connections, local (localhost, 127.0.0.1) or remote (0.0.0.0 or IP address). It's in my.cnf. http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

    2) Check does your user have corresponding privileges. User that logs in from localhost can have different priveleges from remote one. For example 'user'@'localhost' and 'user'@'%'

提交回复
热议问题