Friday, March 27, 2020

[google-cloud-sql-discuss] Wordpress Remote Connect to Cloud SQL - Error establishing a database connection

Hi,

I have an existing wordpress running on my own server and now I want to migrate my database to Google Cloud SQL 


The following I have set in my wp-config.php

I have added my server outgoing, incoming, and cloudflare ip into public ip



define('DB_NAME', 'myblog'); //under MySQL databases

/** MySQL database username */
define('DB_USER', 'myusername');  //under username created under MySQL user accounts

/** MySQL database password */
define('DB_PASSWORD', 'mypass');   //under password created under MySQL user accounts

/** MySQL hostname */
define('DB_HOST', '35.227.86.242');  //under Connect to this instance > Public IP address

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', 'utf8_general_ci');



However, I got Error establishing a database connection error.

Helps needed.

Thank you.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d340341c-d5a6-4420-a475-c5803b21a0df%40googlegroups.com.

No comments:

Post a Comment