Page 1 of 1

how to setup SSL connection to database ? mysql/mariadb

Posted: Fri Jul 14, 2017 8:32 am
by qtwrk
Hi,
I was wondering , if I setup SSL on Mysql or MariaDB , what should I to make OC works with it ?
I have oc2.3.0.2
I looked in

Code: Select all

system/library/db/mysqli.php
which I believe is corresponding to database connection

I found these 2 lines

Code: Select all

	public function __construct($hostname, $username, $password, $database, $port = '3306') {
		$this->connection = new \mysqli($hostname, $username, $password, $database, $port);
and I am stuck here , as I don't know PHP
I googled around , only found one thread related to this , viewtopic.php?f=110&t=30040
but , obviously , it's like 6 years ago...

I did find lot about something about PHP to mysql over SSL in stackoverflow

but I can not merge it with OC's code.
so really appreciated if someone could help me out.

Re: how to setup SSL connection to database ? mysql/mariadb

Posted: Fri Jul 14, 2017 3:06 pm
by thekrotek
Why do you even need this? This is absolutely unnecessary. Some tasks are just pointless and will simply eat your time.

Re: how to setup SSL connection to database ? mysql/mariadb

Posted: Fri Jul 14, 2017 4:50 pm
by paulfeakins
Keep your database on localhost and you won't need it.

Re: how to setup SSL connection to database ? mysql/mariadb

Posted: Fri Jul 14, 2017 6:01 pm
by qtwrk
well , I use master-slave replication to make backup database , and to be secondary site if in case main site is down, so I figured I may need it ...