Page 1 of 1

How to enable SSL when connect to MySQL

Posted: Fri Nov 07, 2008 11:15 am
by Storm@raider
I know how to implement SSL on Apache, This is encrypt when client connect to webserver.

but webserver still connect to database in plain text. I just know MySQL support SSL but how to make joomla use secure connection to MySQL? Which code I need to edit or any tutorial about this? Please let me know.

Re: How to enable SSL when connect to MySQL

Posted: Fri Nov 07, 2008 7:58 pm
by brad
How much more secure is connecting to a service running on the same server?

Re: How to enable SSL when connect to MySQL

Posted: Fri Nov 07, 2008 11:55 pm
by adamos46
You have securosis like many members here. Trying to protect non-sense objects.

Read this, it will give you a brief answer. http://securosis.com/2008/02/12/introdu ... ncryption/ <- it talks about database encryption but it gives you an idea of the attacks that happen in the application layer from malicious users through sql injection.

Re: How to enable SSL when connect to MySQL

Posted: Sat Nov 08, 2008 6:18 am
by Storm@raider
Our company have policy to encrypt all connection, Althought mysql is in the same machine. Or do you think in not necessary to encrypt if in the same machine? Is it possible to hack if it in the same machine?

For database encryption. I think it differenct, for database, I need to encrypt only password, which already encrypted. So I need encrypt only connection to MySQL. This is the remain point which still insecure.

Re: How to enable SSL when connect to MySQL

Posted: Sat Nov 08, 2008 8:57 am
by Tonie
SSL is meant to encrypt connection data between a server and a client, so nobody can sniff the traffic between them. If the database and the webserver and on the same physical/virtual server, no communication between the two is going over any network so data can't be sniffed. This effectively renders using SSL useless.

Re: How to enable SSL when connect to MySQL

Posted: Sat Nov 08, 2008 9:38 am
by Storm@raider
OK. I understood. No need to use SSL with MySQL in case it in the same machine with Apache.

But some server has seperate Apache and MySQL. Any idea how to use SSL in this case?

Re: How to enable SSL when connect to MySQL

Posted: Sat Nov 08, 2008 9:56 am
by adamos46
http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html
Note: You will get a performance hit because of the encryption.

Re: How to enable SSL when connect to MySQL

Posted: Sat Nov 08, 2008 10:56 am
by Storm@raider
I found this but not sure how to edit joomla code

http://th.php.net/manual/en/mysqli.ssl-set.php

Re: How to enable SSL when connect to MySQL

Posted: Sat Nov 08, 2008 3:18 pm
by Tonie
It will be a core hack, since Joomla! doesn't do this out of the box. You're probably pretty much on your own here if somebody doesn't have any good ideas here.