0

I cannot get Wordpress to work with using SSL connection for the database.

My client/server setup is working with a regular DB user over ssl so I can confirm it is setup correctly using MariaDB client.

Here is my 50-client.cnf

[client]

ssl_ca          = /etc/mysql/ssl/ca-cert.pem
ssl_cert        = /etc/mysql/ssl/client-cert.pem
ssl_key         = /etc/mysql/ssl/client-key.pem

And here is my WordPress wp-config.php with the client flag configuration.

define( 'MYSQL_CLIENT_FLAGS', 'MYSQLI_CLIENT_SSL' );

I also tried to define the SSL_CA, SSL_KEY, and SSL_CERT in wp-config.php but that didn't help either.

define( 'MYSQL_SSL_KEY', '/etc/apache2/ssl/client-key.pem' );
define( 'MYSQL_SSL_CERT', '/etc/apache2/ssl/client-cert.pem' );
define( 'MYSQL_SSL_CA', '/etc/apache2/ssl/ca-cert.pem' );

Has anyone got this working and what did you need to do?

1

1 Answer 1

0

I got it working after removing the quotes around MYSQLI_CLIENT_SSL.

Before:

define( 'MYSQL_CLIENT_FLAGS', 'MYSQLI_CLIENT_SSL' );

After:

define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.