SSL MYSQL connections

  • We will support it with the next release, but only for "MySQL PDO".

    You have to set some variables at config.php, see https://wiki.eqdkp-plus.eu/wiki/Config.php#Define_Variables (the ones prefixed with DB_SSL).

    For implementation details see https://github.com/EQdkpPlus/c…28cb94eb2275de68547b13c1b

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • On a related note. I am trying to install eqdkp on a Mysql8 instance. I have setup the DB user to use traditional login not SHA2 but I keep getting this error when trying to access the DB:


    I can login to mysql fine from the linux mysql client, and from mysql workbench.


    Error

    SQLSTATE[HY000] [2002] Connection timed out

  • I think that php cannot use the new password algorithm of mysql 8, but that is nothing we can change.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • Maybe you have misconfigured your php installation. As EQdkp uses the pdo drivers of php, we do nothing directly on databases, but using the PDO abstraction builtin php.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • Maybe you have misconfigured your php installation. As EQdkp uses the pdo drivers of php, we do nothing directly on databases, but using the PDO abstraction builtin php.

    It says its using PHP 7.2 and 7.2 PDO doesnt have an issues talking to MYSQL8 as long as you use the legacy password types on your DB users (which i did).

  • Maybe you did it wrong?

    Please see https://stackoverflow.com/ques…sql-8-connection-time-out


    But I cannot see any problem here with Eqdkp. It is not long ago that I have checked compatibility with mysql8.

    Its a remote-db but using phpmyadmin off my server with the same credentials i am using for the eqdkp installation works as expected (pypmyadmin also does not support SHA2) . That is where i am questioning whats wrong.

  • Maybe some kind of firewall blocking the connection? Would fit to the "Connection timed out" error.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • From examining the sourcecode of PHPMyAdmin, it seams that they directly use MySQLI functions, and not the PDO of PHP. https://github.com/phpmyadmin/…classes/Dbi/DbiMysqli.php


    This might be the difference to EQdkp Plus, which is using PDO.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • So I made a php script to test PDO


    <?php

    $servername = "xxxx.myhostname.com";

    $username = "dbuser";

    $password = "dbpassword";


    try {

    $conn = new PDO("mysql:host=$servername;port=3306;dbname=eqdkp", $username, $password);

    // set the PDO error mode to exception

    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    echo "Connected successfully";

    }

    catch(PDOException $e)

    {

    echo "Connection failed: " . $e->getMessage();

    }

    ?>


    When I run it...

    "Connected Successfully"


    if I typo the password I get a SQLSTATE[HY0000] [1045] Access Denied, what is interesting is if I typo the hostname eventually it will kick out a SQLSTATE[HY0000][2002] connection timed out.


    Is EQDKP somehow failing a hostname lookup or could i be exceeding a string length in the hostname field and its truncating? Could it be ignoring the non-standard port? Any logging get kicked out during install?

  • You have to log yourself, for example like this at file /install/install_steps/db_access.class.php


    The var_dump() returns my set hostname "subdomain.database.myhostname.com", so there is no length restriction.


    We give the hostname directly to the connect() method, at file libraries/dbal/mysql_pdo.dbal.class.php

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • In Line 134 of /install/install_steps/db_access.class.php you have the database connect. Before that, you can add var_dump($this->dbhost);

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • Also, you can try replacing line 134 $db->connect($this->dbhost, $this->dbname, $this->dbuser, $this->dbpass);

    with $db->connect($this->dbhost, $this->dbname, $this->dbuser, $this->dbpass, $this->dbport);

    Then the port will definitely added to the connection string.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • Post by blackmore ().

    This post was deleted by the author themselves ().