Connection between MySQL and WordPress on separate machines.
-
Hi
I have WordPress installed on one server where it is running well. I would like to connect to a mySQL database on another (database server).
I have followed the instructions to set up a WordPress database and granted privileges to a WordPress user.
I used the following GRANT statement as I read to access the mySQL remotely one must specify the ip address of the remote site when when granting the privileges to the user.
GRANT ALL PRIVILEGES ON wordpress.* TO “wordpress”@”196.21.45.%” IDENTIFIED BY “wordpress123”
The config file for on WordPress on the first server looks as follows.
define(‘DB_NAME’, ‘wordpress’); // The name of the database
define(‘DB_USER’, ‘wordpress’); // Your MySQL username
define(‘DB_PASSWORD’, ‘wordpress123’); // …and password
define(‘DB_HOST’, ‘my-database-ip’); // 99% chance you won’t need to change this valueA connection, however, cannot be made to the mySQL database at the ip “my-database-ip”. I get the WordPress “error establishing database connection” page.
Anybody got any advice.
- The topic ‘Connection between MySQL and WordPress on separate machines.’ is closed to new replies.