pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
194 stars 81 forks source link

Linux SSL connection failed! #288

Open borz7zy opened 4 months ago

borz7zy commented 4 months ago

I use a certificate to connect to the database, there are no problems on Windows, but on Linux with version R41-4 there are problems. Errors:

[plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #3159 'Connections using insecure transport are prohibited while --require_secure_transport=ON.'
[plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #3159 'Connections using insecure transport are prohibited while --require_secure_transport=ON.'

Connection configuration:

new MySQLOpt:option_id = mysql_init_options();
mysql_set_option(option_id, AUTO_RECONNECT, true);
mysql_set_option(option_id, SSL_ENABLE, true);
mysql_set_option(option_id, SSL_CIPHER, "DHE-RSA-AES256-SHA");
mysql_set_option(option_id, SSL_CA_FILE, "samp-mysql.pem"); //the certificate is located in the root of the folder
mysql_set_option(option_id, POOL_SIZE, 0);
dbConn = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, option_id);

Ubuntu 22.04 system, debian-static plugin version

I repeat, everything is fine in the Windows version of the plugin, but on Linux there are problems with any SSL configuration