You just need to make sure the mysql server on the vps is set to allow connections from external addresses.

Check mysql.cf, most likely it is only set to bind to localhost.

You also need to allow anyhost to connect to it and this can be done via phpmyadmin.
okone Reviewed by okone on . Remote SQL connections I have a website and a VPS, I want the website to be able to access the SQL databases (version 5.5.8) running on the VPS. I've tried using the GRANT ALL PRIVILEGES command, it didn't seem to do anything. command: GRANT ALL PRIVILEGES ON *.* TO 'SITE'@'178.239.62.125' IDENTIFIED BY 'MY-PASSWORD'; Error from the webpage trying to access the databases: Rating: 5