Secure connection

QuestionsSecure connection
Matt asked 4 months ago

How would I setup my database config.php file to use a secure connection from the grid to the MySQL server please? Referencing a .crt.pem file.

2 Answers
Abu Ghufran Staff answered 4 months ago


I researched on your question but the database library wrapper we are currently using (php-adodb) does not support ssl database connection settings.

The change in core library is doable but it will break with the future changes.

You can change lib/inc/adodb/drivers/

On line 112 before mysqli_real_connect, you can call: mysqli_ssl_set as in

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Matt answered 4 months ago

Perfect, thanks! This was the key to getting it to work.


mysqli_ssl_set($conn, $clientkey, $clientcert, $sharedca, NULL, NULL);
if (!mysqli_real_connect($conn, $host, $user, $pass, $db))
    die("Failed connecting to ssl mysql via mysqli");

Also, the php formatting example here:


Your Answer

6 + 11 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?