Horje
Sets SSL keys and certs for encrypted MySQL database connections. Wordpress Tutorial

Noted That:

  • To install correctly this secure-db-connection.zip .
  • Fisrt Download the secure-db-connection.zip to your computer
  • Extract/Open secure-db-connection.zip to Your Computer.
  • Then, Find readme.txt file inside secure-db-connection.zip and Open readme.txt .
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the Tips Below.

Start the Tips:

1. First Download " secure-db-connection.zip " Plugin to your Local Computer. (Click Download)

2. Then, Login to your " yourdomain.com/wp-admin " Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on " Plugins " + " Add New " from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse " secure-db-connection.zip "  Downloaded plugin from your computer, Where you downloaded secure-db-connection.zip According to Step – 1 Above then, click on " Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on " Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. " Secure DB Connection " folder is added on left sidemenu. Now, Click on " Secure DB Connection " folder.

   Noted that: If you do not see " Secure DB Connection " folder on left sidemenu then, see at left sidemenu " Settings " or " Tools ".

8. Now you configure yourself oR Watch video tutorial below about  Secure DB Connection Configurtions and Settings or How to work " Secure DB Connection " in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to " Plugins " + " Installed Plugin " from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find " Secure DB Connection " Activated Plugin from Plugin List.
  4. Then, Click on " Settings " from Plugin that is Secure DB Connection
  5. Now, Edit/Add/Config the setting and Click on " Save Changes " button,
WP Plugin Setting



Guide

For detailed installation instructions, please read the standard installation procedure for WordPress plugins .

  1. Install and activate plugin, if the filesystem is writable the Secure DB Connection dropin will be installed for you automatically. If not proceed to step 2
  2. Symlink or copy the db.php file from the /wp-content/plugins/secure-db-connection/lib/ directory to the /wp-content/ directory.
  3. Set the relevant defines in your wp-config.php file.

Configuration Parameters

To adjust the configuration, define any of the following applicable constants in your wp-config.php file.

  • MYSQL_SSL_KEY [default: not set]

    The path name to the key file. (RSA Key)

  • MYSQL_SSL_CERT [default: not set]

    The path name to the certificate file.

  • MYSQL_SSL_CA [default: not set]

    The path name to the certificate authority file in PEM format.

  • MYSQL_SSL_CA_PATH [default: not set]

    The pathname to a directory that contains trusted SSL CA certificates in PEM format.

  • MYSQL_SSL_CIPHER [default: not set]

    A list of allowable ciphers to use for SSL encryption. You can leave this blank if you want to just use the strongest available.

Turning on SSL

First please note, only the mysqli (MySQL Improved) extension is supported this is the default extension used by WordPress however if you do not have the extension installed WordPress will fallback on the much older mysql extension which does not support secure connections.

Depending on your database configuration you may not need to set all the available options. For example when connecting to RDS Amazon helpfully provides a certificate bundle so once that’s downloaded to the server all that’s need is to set the CA option:


define( 'MYSQL_SSL_CA', '/path/to/rds-combined-ca-bundle.pem'
);

Once SSL keys / certs have been configured you via the defines above define an WP core constant to pass a use SSL flag to the mysqli client also in your wp-config.php file.


define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL
);

If you are using the MySQL Native Driver and MySQL 5.6 or later mysqli_real_connect() will verify the server SSL certificate before connecting. If the SSL cert installed on the MySQL server your are connecting to is not valid PHP will refuse to connect. A flag was added to disable server certificate validation. If your server has an invalid certificate turn on SSL and turn off validation like so:


define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
);

Example Config

Aside from setting the normal MySQL connection parameters the minimum configs to get SSL connections to the database will look something like this in wp-config.php :


define( 'MYSQL_SSL_CA', '/path/to/ca-bundle.pem' );
define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL );

sets , keys , certs , encrypted , mysql , database , connections , tutorial ,

Name

Read Article
https://develop.horje.com/learn/1434/reference