Is the web server the same physical server than the database server? bind-address
should be an address that is assigned to your server -- if ifconfig
lists the address, then you can use it for MySQL. You can't just blindly pick some IP and put that as bind-address
, no sir.
EDIT: It seems you understand bind-address
completely wrong.
1) Put your database server IP address as bind-address
.
2) With MySQL GRANT
statements, allow your web server IP (or DNS name...) to access certain database as certain user with the privileges you want to grant, for example
GRANT SELECT,INSERT,UPDATE,DELETE ON mywpinstallation.*
TO 'someusername'@'yourwebservername.yourdomain.com'
IDENTIFIED BY 'supersecretpassword'
3) Configure your web application to contact your database server as the user you just granted.
4) Make sure your database server is not reachable from the outside world; use the firewall you have, or if you somehow don't have a separate firewall, just use iptables
.