SSL requirement for connecting to a database for MediaWiki / Apache / PHP / MySQL with OpenSSL

For a school project, I installed MediaWiki on my local machine, and I need any connection to the MySQL database database to use SSL. I'm not sure how to connect all the dots. Here is what I have done so far:

  • I installed OpenSSL and created a self-signed certificate and its associated keys.
  • phpinfo () shows that OpenSSL is enabled.
  • I have included this in the [mysqld] my.ini section:

SSL-key = "C: /newcerts/server-key.pem" SSL-CERT = "C: /newcerts/server-cert.pem" SSL-ca = "C: /newcerts/ca-cert.pem"

  1. Running the command line MySQL asks me for the root password, and after entering it, I get error message 1045: Access denied, etc.

  2. Running mysql -u root -p ssl-ca = "C: /newcerts/ca-cert.pem" from the bin directory and entering the password has completed successfully and gives me a mysql prompt. The start status shows SSL: The cipher used is DHE-RSA-AES256-SHA.

Here where I am confused. What else needs to be done (for example, through Apache or the PHP configuration file or the MediaWiki file) to require a database connection to use SSL?

+3
source share
1 answer

You will want to use the mysqli extension because the native php / mysql extension does not support SSL. See mysqli-related SSL function:

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

, DB MediaWiki , , , php/mysql, mysqli, , mysqli, , , - .

MediaWiki mysqli.

+5

Source: https://habr.com/ru/post/1706931/


All Articles