Remote MySQL Database Hosting for WordPress

Grant permissions for the username on the remote server

Mert Ilis
2 min readNov 30, 2014

Storing WordPress MySQL database on a remote hosting server shouldn’t be an issue normally. The only thing you have to do is changing the “DB_HOST” parameter to whatever remote server IP your MySQL db is running. You don’t even have to add the port number to the IP address if you are using the default port for the MySQL server which is “3306”.

Change the “localhost” shown above to “xxx.xxx.xxx.xxx” (MySQL Server IP) or “xxx.xxx.xxx.xxx:pppp” if MySQL Server listens a different port than 3306.

NOTE: If you are using a firewall on the remote server than you should consider adding an INBOUND rule to allow connections coming from the WordPress server.

Simple it is.

Well, it was not that easy for me!

I had to add permissions for the username on the remote server. To do this run the following command on the MySQL command line tool:

mysql> GRANT ALL ON database_name.* TO username@wordpress_server_IP IDENTIFIED BY 'password';

After that I was able to connect my hosted remote MySQL database for my WordPress.

Hope it helps!

Originally published at http://www.weboideas.com on November 30, 2014.

--

--

Mert Ilis

I’m a software development enthusiast who likes trying different web technologies and adding value to his team.