ISPconfig latest version, fresh install but WordPress can not access database

Discussion in 'General' started by mikenamib, Apr 25, 2024.

  1. mikenamib

    mikenamib New Member

    Hi,
    need some help. please!
    Just built a new ISPconfig LAMP Server, latest version with Ubuntu 22.04 TLS and:
    wget -O - https: "//" get.ispconfig.org | sh -s -- --use-ftp-ports=40110-40210 --unattended-upgrades
    Seems to work fine!
    I created Accouts, Domains and database and checked all with phpmyadmin, but still a WordPress Installer can not access database: "Fehler beim Aufbau einer Datenbankverbindung"
    It doesn´t matter if I adress the database in wp_config.php with localhost, 127.0.0.1, 127.0.0.1:3006, or the IP of the server?

    What else my I check?
    Any Ideas here?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Are you able to login with the username and password you created for this database in phpmyadmin?
     
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    I can comfirm I had some issues with new database users and had to set the password again initially for a few times.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you use Ubuntu 22.4 too? And are you sure you did not use Ubuntu 24.04, which os not supported yet? I'm mainly using Debian 12, and there are no issues with Debian. If more users encounter issues with Ubuntu 22.04, then I can make a fresh test install, maybe Ubuntu changed something.
     
  5. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    yes, 22.04. Did create database prior to user.
    Don't think it is ubuntu much, maybe just a bad timing or something scrambles the password as it works the second time?
    Havent checked yet but maybe the CREATE USER vs the update routine differs and it is Mariadb 10.11 ?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    So you are not using the default MariaDB version that ships with Ubuntu 22.04? Latest MariaDB versions work different when it comes to user management and we only support the versions that ship with the OS. Newer versions might or might not work. I'll test newer MariaDB when implementing Ubuntu 24.04 support now anyway.
     
  7. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Just confirmed the issue and I am using 10.11-lts yes. Packaged MariaDB caused issues in the past and I won't let them on my system anymore, I need to have a predictable upgrade path in terms of versions, Debian lead to unuseable indexes in the past and I had to do a freaking downgrade and upgrade again - big mess. And I know it is not the usual, some systems worked, some did not.

    Anyway, no need to repeat it is not the default setup, it is what it is, either you care or not, up to you - it is a "custom" setup and custom solutions usually cost time and money, I understand.

    However, we do not know what the original author is using? Maybe the issue is something else. Mariadb has also changed the listening interface config at some point, have done an upgrade from debian 11 to 12 on a customers box with stock mariadb ( due to reasons ) and Listen = 0.0.0.0 does not allow connections from localhost or ::1 anymore as you need to provide both IPs, which interestingly I do not need for 10.11 from mariadb.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Correct, and we care for custom setups of course. But that kind of support and development work is not available for free. Please contact business support or use the developer contact form on our website, ispconfig.org, if you need help or ISPConfig customizations for your setup.
     
    ztk.me likes this.
  9. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    let us not confuse this thread anymore, I do not need support, just confirmed the issue, if its related to my setup is to be proven. And no way to tell it is related to the authors question here =)
     
    ahrasis likes this.
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe one more suggestion for the thread starter: Usernames and database names do have a prefix (unless you removed and disabled prefixes), so take care that you entered the full username and database name, incl. the prefix. And in case you changed MySQl root password manually, take care to change it also in the ISPConfig mysql_clientdb.conf file, otherwise ISPConfig will not be able to create users and databases anymore. And if this does not help, run the test script from read before posting thread and post the result.
     
    ahrasis and ztk.me like this.
  11. mikenamib

    mikenamib New Member

    I can login with "root" and give password, but I can not with the database user created, respecting full username, incl. the prefix:
    It fails with "mysqli::real_connect(): (HY000/1045): Access denied for user '????'@'localhost' (using password: YES)"
     
  12. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Go to database users and change the password - to the current one indeed, it may have not have been created correctly.
    Make sure ISPConfig has kept the setting for the user association to the database.
    Which version of Mysql or MariaDB are you using ( only if you made extra steps to install a different version, if you did not, it is not that important to me )
     
  13. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    If you did everything right, it could be this bug
    https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6695

    in that case, probably easiest way for you would be to use phpmyadmin as root and change the password.
    Just remember if you update the user, database maybe - not sure - in ISPConfig it might get scrambled again
    Not sure but in theory, if you change the $password to $database_password, it might do it's job.
    Or try a password matching that regex?!
     
    Last edited: Apr 26, 2024
  14. mikenamib

    mikenamib New Member

    Wonderful! This helped. Did password reset on command line and checked for case sensitive typos, now it works like a charm!
    Thank you for supporting this!
     
    ahrasis and ztk.me like this.
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig encrypts the password in the UI using MySQL password() function to avoid any cleartext password in the database, so the server-side plugin always gets an encrypted password, and this code fragment should never match, the mysql_clientdb plugin has been rewritten several times, and this might have been a remnant code of an older version. I guess the underlying issue might be related to caching_sha2 passwords in the newer MariaDB versions, which do not match the regex pattern of older passwords, which would also explain why you have issues when installing a MariaDB version that is too new for the current ISPConfig. So I guess changing $password to $database_password will not fix it, and we will have to find a way to add support for caching_sha2 without needing a cleartext password in the database.
     
    ahrasis likes this.

Share This Page