• This is a wordpress that I created in compute engine of Google Cloud Platform: https://34.124.173.171/

    I connect the wordpress with the Cloud SQL’s MySQL instance via SSL, but it keep show this error…

    Here are the content of my wp-config.php where I download the 3 .pem files from server certificate of MySQL and I store them in /svr/www/wordpress/wp-content/mysql-ssl directory

    define( ‘DB_NAME’, ‘wordpress’ );\

    /** Database username */

    define( ‘DB_USER’, ‘root’ );

    /** Database password */
    define( ‘DB_PASSWORD’, ‘redacted by moderator’ );

    /** Database hostname */
    define( ‘DB_HOST’, ‘34.142.133.130’ );

    /** 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’, ” );

    define( ‘MYSQL_CLIENT_FLAGS’, MYSQLI_CLIENT_SSL );
    define(‘MYSQL_SSL_KEY’, ABSPATH . ‘wp-content/mysql-ssl/client-key.pem’);
    define(‘MYSQL_SSL_CERT’, ABSPATH . ‘wp-content/mysql-ssl/client-cert.pem’);
    define(‘MYSQL_SSL_CA’, ABSPATH . ‘wp-content/mysql-ssl/server-ca.pem’);

    • This topic was modified 10 months, 2 weeks ago by Yui. Reason: password removed
Viewing 5 replies - 1 through 5 (of 5 total)
  • Flint

    (@flintstoned)

    Please make sure the user ‘root’ is correct and that the user has all access to the database.

    If the password you posted is your real password, then edit your post to remove it immediately… and immediately change the MySQL password on the GCP server. Also, change the IP address (in the post) to a dummy one like 192.0.2.1 (which is meant for documentation and such).

    To your actual question…

    Since WordPress and MySQL are on different servers, is the Cloud SQL for MySQL instance configured to receive remote connections (at least from the VM running WordPress)?

    Moderator Yui

    (@fierevere)

    永子

    make sure to use working ip,

    mysqld is seldom open to the world

    use localhost to connect via unix socket

    or 127.0.0.1 to use tcp to local machine

    if you are using different machines – make sure to set mysqld listen to world ip rather than local

    i have redacted your mysql password in first post, make sure to sanitize data before you post to public places

    • This reply was modified 10 months, 2 weeks ago by Yui.

    Attempt to establish a Telnet connection from your web server to the database server using the provided command. This is to verify that the database server is configured to accept remote connections.
    telnet 34.142.133.130 3306

    Additionally, ensure that you have allowed remote MySQL connections for DB user.

    If you provide some context as to what you are attempting to achieve with MySQL SSL files, we may be able to provide some solutions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[NSFW] How wordpress connect Cloud SQL’s MySQL’ is closed to new replies.