Please wait...

Multiple DB engine connections support (MySQL, MS SQL, Postgre SQL)

Video versionSee a video tutorial how to connect with multiple databases

Separate database connection settings tabSeparate database connection settings

Enable this setting if you want to build tables using data from a database or host different from the one you use for your WordPress installation.

From 2.3 version of our plugin there is an option to add more than one separate database connection. Now every table can have its own separate database connection, so tables can pull data from multiple databases and servers.

There are separate database connections for MySQL, MS SQL and PostgreSQL databases.

Please note: in order to use MS SQL as your separate database connection the minimum required version should be MS SQL server 2012.

If you enable this switch, you’ll also need to provide the following data to be able to query the chosen database:

  • Connection Name: Set the connection name
  • Vendor: Pick vendor MySQL, MSSQL or PostgreSQL
  • Name:The name of the database you intend to use.
  • Host: The address of the host, domain or IP-address.
  • Port: If you use a non-standard (different from 3306 for MySQL, 1433 for MSSQL, 5432 for Postgre SQL ) , you can define it here.
  • User: The username to be used for login.
  • Password: The password to be used for login.
  • Test DB settings: Use this button to check if your settings are correct.

If you successfully connected to your separate database, now when you create a new table you will have an option to choose which database will be used for creating the new tables.

If your WordPress is hosted on Microsoft SQL Server that have drivers for PHP: SQLSRV extension or PDO_SQLSRV extension you will need to modify file wp-content/plugins/wpdatatables/config/ and around line 65 find this line of code:

$wdtMsSqlDriver = [
‘sqlsrv’ => [‘active’ => false],
‘dblib’ => [‘active’ => true, ‘version’ => ‘7.0’],
‘odbc’ => [‘active’ => false, ‘driver’ => ‘{ODBC Driver 17 for SQL Server}’],

and change it to look like this:

$wdtMsSqlDriver = [
‘sqlsrv’ => [‘active’ => true],
‘dblib’ => [‘active’ => false, ‘version’ => ‘7.0’],
‘odbc’ => [‘active’ => false, ‘driver’ => ‘{ODBC Driver 17 for SQL Server}’],

Do you have the best

essential plugins installed?

Grab the best 46 plugins. Tested and sorted.

Plugins for SEO, Caching, Security, Design and UX, Stats & analytics, Social sharing. Only the best ones.

By clicking "subscribe" you consent that the information you provide via this form will be securely processed and stored in compliance with EU privacy laws (GDPR).

Thank you for subscribing! Please check your inbox to download the WordPress goodies.