79620276

Date: 2025-05-13 19:06:02
Score: 2
Natty:
Report link

Thanks to engineersmnky, I was able to solve my problem.

From this issue on github : https://github.com/brianmario/mysql2/issues/1379, I found that the new releases of the mariadb-connector-c (from late 2024, after the latest version of mysql2 as of now which is 0.5.6 from 28/02/2024), now forces by default the connection to a distant server with TLS, or at least verification of the distant server certificate. However, a variable was added named MARIADB_TLS_DISABLE_PEER_VERIFICATION, which is not initiated with mysql2 and serve to deactivate the tls certificate verification. (https://mariadb.com/kb/en/mariadb-connector-c-3-4-3-release-notes/)

So, a good way to solve this issue and skip the tls connection phase, is to instance this environment variable with :

ENV['MARIADB_TLS_DISABLE_PEER_VERIFICATION'] = '1'
At the start of you program.
This initiate the variable that make mariadb-connector-c to skip TLS verification.
Now, TLS connection is not activated and I can connect to my remote mysql server without needing ssl certificate or a TLS connection.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: PrincessPeachTheDev