How to install WordPress from hosting service with mysql database from Compute Engine GCP?


I own a wordpress website ( that running well with hosting service (cpanel). So i want to create a new subdomain ( and install wordpress in there but for the database i want to use Compute Engine from Google Cloud Platform.

I already install mysql on the CE and running perfectly, but unfortunately i couldn’t connect it to my hosting service to install wordpress.

how can i do this?

what i already tried:

  1. create mysql on CE (running with ssh)
  2. create database, create user(connect to web ip), and password
  3. changing the my.cnf (change the bind-address to
  4. setting up wp-config installation on file manager on my hosting service, such as: database_name,user,password, and host
  5. connect the database from CE to mysql client (mysql workbench)
  6. make sure the port open: 3306

“error establishing a database connection” when i try

potentially to be the problem:

  1. the mysql, i couldn’t retrieve the database ip, cs when i run “mysql> status” it would return: connection: Localhost via UNIX socket
  2. the wp-config setup, do i need to change the db_host? i thought it should be the database ip, but i couldn’t get the ip.

cheers from indonesia.

, Rio Manik 1 year 2020-07-27T07:19:21-05:00 0 Answers 43 views 0

Leave an answer