How to install WordPress from hosting service with mysql database from Compute Engine GCP?
I own a wordpress website (website.com) that running well with hosting service (cpanel). So i want to create a new subdomain (new.website.com) 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:
- create mysql on CE (running with ssh)
- create database, create user(connect to web ip), and password
- changing the my.cnf (change the bind-address to 0.0.0.0)
- setting up wp-config installation on file manager on my hosting service, such as: database_name,user,password, and host
- connect the database from CE to mysql client (mysql workbench)
- make sure the port open: 3306
“error establishing a database connection” when i try new.website.com
potentially to be the problem:
- the mysql, i couldn’t retrieve the database ip, cs when i run “mysql> status” it would return: connection: Localhost via UNIX socket
- 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.