Skip to Content

mysqli::real_connect(): this stream does not support SSL/crypto Filename: mysqli/mysqli_driver.php

Unable to access the Ezeelogin web gui with SSL enabled


Overview: This article explains how to resolve the issue of being unable to access the Ezeelogin web GUI with SSL enabled. The error logs indicated an issue with the MySQL SSL configuration. The problem was traced to the incorrect entry of the db_port variable as /var/lib/mysql/mysql.sock. Changing this variable to db_port 3306 resolved the issue, as SSL does not work over MySQL sockets.


Below shows the error in the application logs(/var/www/ezlogin/application/logs/log-2020-01.php) 

ERROR - 2020-01-07 09:29:42 --> Severity: Warning --> mysqli::real_connect(): this stream does not support SSL/crypto /var/www/ezlogin/system/database/drivers/mysqli/mysqli_driver.php 201

ERROR - 2020-01-07 09:29:42 --> Severity: Warning --> mysqli::real_connect(): Cannot connect to MySQL by using SSL /var/www/ezlogin/system/database/drivers/mysqli/mysqli_driver.php 201

ERROR - 2020-01-07 09:29:42 --> Severity: Warning --> mysqli::real_connect(): [2002]  (trying to connect via (null)) /var/www/ezlogin/system/database/drivers/mysqli/mysqli_driver.php 201

ERROR - 2020-01-07 09:29:42 --> Severity: Warning --> mysqli::real_connect(): (HY000/2002):  /var/www/ezlogin/system/database/drivers/mysqli/mysqli_driver.php 201

ERROR - 2020-01-07 09:29:42 --> Unable to connect to the database

DEBUG - 2020-01-07 09:29:55 --> UTF-8 Support Enabled

Step 1: Check the db_port variable in the ez.conf file.

cat /usr/local/etc/ezlogin/ez.conf | grep -i 'db_port'
db_port /var/run/mysqld/mysqld.sock

Step 2: Change the db_port variable from /var/run/mysqld/mysqld.sock to 3306 to get the Ezeelogin GUI working, as SSL does not work over mysql sockets.

:~# vi /usr/local/etc/ezlogin/ez.conf

db_port 3306


Related Articles:

configure jump server to use SSL for MySQL

SSL Certificate failed with MySQL SSL