ispconfig_update.sh can't connect to mysql

Discussion in 'Installation/Configuration' started by Stokesy, Dec 20, 2024 at 2:26 PM.

  1. Stokesy

    Stokesy Member

    Hi
    I am having all sorts of problems with my ISPConfig migration (which has been working for a while but didn't let me add any new sites SSL certs, and has now broken SSL certs).
    I tried to run ispconfig_update.sh --force to remake all the SSL certs but it failed saying:
    Checking ISPConfig database .. mysqlcheck: Got error: 2002: Can't connect to server on 'localhost' (111) when trying to connect
    OK
    ERROR 2002 (HY000): Can't connect to server on 'localhost' (111)
    ... I have checked the contents of /usr/local/ispconfig/server/lib/mysql_clientdb.conf and it is correct - I have even tried it with another user than root to which I gave all privileges, but get the same result. root user has full access from localhost (as did the alternative I tried), so I don't understand what is going wrong .
    I am using MariaDB 10 on ubuntu 22.04
    Any help very welcome!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    An ISPConfig update can not help to solve failing website cert renewals. If you have an issue with creating LE certs, just follow the Let's Encrypt error FAQ:

    https://forum.howtoforge.com/threads/lets-encrypt-error-faq.74179/

    This means the system is unable to connect to localhost. You can test it like this:

    mysql -h localhost -u root -p

    and then enter the MySQL root password from the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf
    If the above command works, then test this next:

    mysql -h 127.0.0.1 -u root -p
     
    ahrasis likes this.
  3. Stokesy

    Stokesy Member

    Hi Till - thanks for that... I am having a bit of confusion between localhost and 127.0.0.1 - I always assumed they were the same, but as you suggested, although user@localhost could connect, [email protected] could not.
    I have now added user@host MySQL (MariaDB) - is there a way to test that ispconfig_update.sh will work without forcing a reinstall of isp-config?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    They are not the same, localhost in MySQL refers to the socker, 127.0.0.1 to the network connection, and both have their own root user.

    No. But you will see it when you install the next update. You can also test it by adding a mysql database, if you can login to the database using phpmyadmin, then the connection details are correct again.
     

Share This Page