Okay
  Public Ticket #3634772
Separate Databases (PostgreSQL)
Closed

Comments

  • Doug Casebolt started the conversation

    Hello,

    Just getting started with your product and Wordpress.  I am currently developing a site that is hosted through Wordpress.com.  I need to be able to store and read data into an externally hosted PostgreSQL database.  I have paid for your premium account and when I go into the settings > separate DB settings and try to add it in, I am unable to select a PostgreSQL driver from the dropdown.  A quick search returns that I need to install the drivers at the command line.  When I enable the CLI and go in, I am unable to install the drivers as I don't have enough privileges, a limitation on the hosting I presume.  Is there any way to make this work while having them as hosting site?  For reference the error it returns is this:

    "wpDataTables could not connect to postgresql server. postgresql said: There was a problem with your SQL connection - could not find driver"

  •  1,846
    Miloš replied

    Hi Doug,

    Generally speaking, when our Users try to connect to PostgreSQL, I will advise you for some general steps you can check :

    First, please check if you have the following drivers installed, and activated.

    3838527468.png

    These drivers need to be installed and activated on the server where your WordPress website is. 

    The server to which wpDataTables is connecting has its own method of establishing the connection, and we're using PHPs logic of connecting to separate connections.

     If there are errors your server returns, those are returned by the server, and only displayed by wpDataTables

     - there's no additional log within wpDataTables that would distinctively show you what's behind the error.

    -

    If your PostgreSQL is installed on Ubuntu 18.04 server, and you’re receiving the following error:

    “wpDataTables could not connect to postgresql server. postgresql said: There was a problem with your SQL connection – could not find driver”

    You may need to install the PGSQL driver by following these steps:

    [sudo] apt-get install php-pgsql

    Then uncomment pgsql and pdo-pgsql extentions in php.ini and restart Apache with the following command:

    [sudo] /etc/init.d/apache2 restart

    Let me know if these steps might have helped to solve the issue;


    Here is some additional advice, in case if you have chosen a different driver from our dropdown in the External DB Connection configuration.

    You should only select the driver from the dropdown if the connection doesn't work. 


    The plugin detects the connection you selected (MSSQL, MySQL, PostgreSQL) and based on that it attempts to connect using the default driver for that type of database.

     If that doesn't work automatically, then you need to select a different/ specific driver.

    If you have a Linux server, you can take a look at this thread on Stack Overflow. 


    There are a lot of resources available online for installing the PHP drivers, so the hosting provider should be able to do this without many issues.


    Let me know how it goes, one of these suggested methods should allow you to add your DB connection.

    Thank you.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables