Okay
  Public Ticket #1890642
very slow database connection
Closed

Comments

  •  1
    Gemma started the conversation

    Hello,  I have wpDataTables connected to a MySQLDB on the same server as my wordpress build but it is taking 12-14 seconds for a table to appear and any additional searches on the table is taking 12-14 seconds too. There are 7000 rows and 8 colums on the table. The database has just one table. 

    Any advice would be greatly appreciated as I am under time pressure to get a site live this week and though I've now spent around €100 euros on this plugin plus the filterable module for it, I am considering using a different plugin if this can't be resolved, due to time pressure.

    Thanks

  •  1
    Gemma replied

    Also,  I made my connection to MySQLdb via IP address.

    When I try it via localhost I get the following error


    Error

    wpDataTables could not connect to mysql server. mysql said: There was a problem with your SQL connection - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


  •  1
    Gemma replied

    When I tried connecting with 127.0.0.1I get the following error


    Error

    wpDataTables could not connect to mysql server. mysql said: There was a problem with your SQL connection - Can't connect to MySQL server on '127.0.0.1' (111)


  •  2,572
    Aleksandar replied

    Hello Gemma.

    Thank you for your purchase.

    If you are using separate MySql connection option to connect to mysql database, you can test if connection can actually be established with “Test MySQL settings” button.
    If connection can’t be established, first please make sure that all entered values needed for connection are correct.
    Also, make sure that MySql server is allowing remote connections and that MySql user that you are trying to connect with is allowed to connect from your sites host (IP address).

    If your WordPress is hosted on Azure Web App Services you will need to modify the ../wp-content/plugins/wpdatatables/config/config.inc.php file, 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}'],
    ];

    Let me know if this helps.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    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