[Answer]-Access remote MySQL server without editing my.conf

1👍

The bind-address doesn’t specify which IPs can connect to that server, but which address is MySQL listening to. So, just set it to 0.0.0.0 and it will work. Please make sure you’ve got a user account with that address. Check mysql.user table.

Addressing the root-access thing:
* If you installed mysql manually, you’ve got root access.
* If you didn’t install mysql manually, but it’s a service provided by the VPS hosting, then the bind-address should be 0.0.0.0 (or at least not 127.0.0.1). If it’s not the case, contact them because they’re screwing up pretty bad.

Hope it helps.

EDIT, CLARIFICATION:

MySQL bind-address is not a security constraint. If you want to allow some addresses to connect to the server you should create/grant users with the that address specified, like this

CREATE USER 'bobdole'@'192.168.10.221';

0👍

Rather hacky, but I think this should be possible with MySQL Proxy listening on an unprivileged port on the public IP, proxying all queries to the mysqld which is running locally.

Leave a comment