I have a gentoo where is installed a mysql server. I need a remote access to this server, so I have modified the option bind address in the file /etc/mysql/my.cnf bringing it from



bindaddress: MY_FOREIGN_IP

And in this way I obtain a remote access to the mysql server.

The problem is that I have a local service that uses ip to talk with my database. If I change the bindaddress option, this service can't reach mysql server anymore.

There is a way to solve this issue, without using ssh tunnel?

1 Answer 1


You can bind to, so that MySQL will accept connections to any IP address that exists on the host, including

Local clients can usually also connect via a unix socket; check the config for a socket: line. That may be a viable alternative to using

Make sure that the MySQL users have sufficient privileges from the client IP they are connecting from.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.