If non of the solutions above worked for you, here it is:
Define the MYSQL_CLIENT_FLAGS constant before
require_once(ABSPATH . 'wp-settings.php');
And defining will be
define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);