Warning: mysqli_real_connect(): (HY000/3159): Connections using insecure transport are prohibited while --require_secure_transport=ON

Posted December 1, 2017 10.7k views
MySQLWordPressUbuntu 16.04

I followed this tutorial here “” to Set Up a Remote Database with MySQL on Ubuntu 16.04.

I have also download wordpress onto the web server. However when i attempt to run the wordpress install from browser, I get this error (wordpress debug mode set to true):- Warning: mysqlirealconnect(): (HY000/3159): Connections using insecure transport are prohibited while –requiresecuretransport=ON. in /var/www/html/wp-includes/wp-db.php on line 1538

What is causing this error and How do I fix this error?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

go to
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

just remove the
“requiresecuretransport = on”
sudo systemctl restart mysql

now you can check login from webserver to database server

I do not believe the answer above is sufficient, if you want to establish an encrypted connection between your database server and web server.

I dealt with the same problem and solved it by changing the ownership of the generated ca.pem, server-cert.pem and server-key.pem files from root to mysql.