Welcome Guest, Not a member yet? Register   Sign In
Database connection using mysqli and ssl_ca
#1

(This post was last modified: 03-30-2021, 02:29 AM by fedeburo.)

Hi, im facing some problems when connecting to a database using ssl_ca certificate. The thing is, when i access to the database using mysql through the terminal using the same params as they are in env, it connects succesfully. But when i make the connection through CI4 with the ::Connect using the correct database and params, it fails and in the logs it says that access is denied for '****'@127.0.0.1. I dont understand why it is denying the access throguh CI and not through mysql. the encryption i added like this: 

database.xxx.encrypt.ssl_ca = '/etc/.../....'

Nevertheless, when i make the connection with mysql with the terminal, if i dont put the path to the ssl_ca cerrtificate, it also let me get in!

Also, is important to say that in local environment, the database connection works with the hostname localhost, but not with 127.0.0.1 (both are configured with privileges), but in dev, the only way i must connect is with 127.0.0.1, and this is not working

Wait for answers, thanks!!
Reply
#2

Another question, it is neccesary all the:
ssl_key
ssl_cert
ssl_ca
ssl_capath
ssl_cipher
ssl_verify

defined paths or only with the ssl_ca path is enough?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB