0

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: 127.0.0.1

to

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 127.0.0.1 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

1

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

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 127.0.0.1.

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .