URGENT HELP NEEDED - ISPconfig Update cannot cnnect on database

Discussion in 'ISPConfig 3 Priority Support' started by Petar, Aug 1, 2024.

  1. Petar

    Petar Member HowtoForge Supporter

    Perfect server Debian 12 apache php mariadb
    i can connect to ISPC graphic interface, create user, created website, database user, database - all working.
    SYMPTOM 1: no logs at /var/log/mysql
    SYMPTOM 2: Cannot upgrade ISPCONFIG:

    ispconfig_update.sh --force

    >> Update

    Operating System: Debian 12.0 (Bookworm) or compatible

    This application will update ISPConfig 3 on your server.

    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: no

    Checking MariaDB version 10.11.6 .. OK
    Checking ISPConfig database .. mysqlcheck: Got error: 2002: Can't connect to server on 'localhost' (115) when trying to connect
    OK
    ERROR 2002 (HY000): Can't connect to server on 'localhost' (115)
    Unable to call mysql command line with credentials from mysql_clientdb.conf

    ANSWER: The password at mysql_clientdb.conf is correct and i can log in to mysql with it

    ---------

    systemctl status mariadb
    ● mariadb.service - MariaDB 10.11.6 database server
    Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/mysql.service.d
    └─limits.conf
    Active: active (running) since Thu 2024-08-01 10:45:39 CEST; 29min ago
    Docs: man:mariadbd(8)
    https://mariadb.com/kb/en/library/systemd/
    Main PID: 175143 (mariadbd)
    Status: "Taking your SQL requests now..."
    Tasks: 18 (limit: 9480)
    Memory: 217.5M
    CPU: 1.723s
    CGroup: /system.slice/mariadb.service
    └─175143 /usr/sbin/mariadbd

    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Note] InnoDB: log sequence number 12777883228; transaction id 12789426
    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Note] Plugin 'FEEDBACK' is disabled.
    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog>
    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Note] Server socket created on IP: '127.0.0.1'.
    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Note] /usr/sbin/mariadbd: ready for connections.
    Aug 01 10:45:39 mail311148 mariadbd[175143]: Version: '10.11.6-MariaDB-0+deb12u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 12
    Aug 01 10:45:39 mail311148 mariadbd[175143]: 2024-08-01 10:45:39 0 [Note] InnoDB: Buffer pool(s) load completed at 240801 10:45:39
    Aug 01 10:45:39 mail311148 systemd[1]: Started mariadb.service - MariaDB 10.11.6 database server.
    Aug 01 10:45:39 mail311148 /etc/mysql/debian-start[175171]: Checking for insecure root accounts.

    -----------

    Tried the procedure from: https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/

    and i get this:
    /usr/local/ispconfig/server/server.sh
    01.08.2024-11:21 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    01.08.2024-11:21 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished server.php.


    PLEASE HELP - I must put a working website yesterday!

    Thanks in advance for your time
     
    cole16 likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Test login from localhost and 127.0.0.1:

    mysql -h localhost -u root -p

    and

    mysql -h 127.0.0.1 -u root -p

    enter the password from /usr/local/ispconfig/server/lib/mysql_clientdb.conf when the commands request it.
     
  3. Petar

    Petar Member HowtoForge Supporter

    I FORGOT to tell you that the password is good when i connect locally:

    mysql -h 127.0.0.1 -u root -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 54
    Server version: 10.11.6-MariaDB-0+deb12u1 Debian 12
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    MariaDB [(none)]> quit
    Bye
     
  4. Petar

    Petar Member HowtoForge Supporter

    Is there any place in the ISPConfig configuration files where it keeps the database port?
    I had previosely changed the port in /etc/mysql/my.cnf but since the problem i had put it back to the default 3306
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    That's just one of the two tests I asked you to do. Please now do the other one.

    Changing the port is not supported, it might somehow work partially but we neither support nor test this at all, so this might be the cause of your issue. Fisrt, undo all changes in mysql config files you made. Then check /usr/local/ispconfig/server/lib/config.inc.php and /usr/local/ispconfig/interface/lib/config.inc.php that the default port 3306 is set there as well.
     
  6. Petar

    Petar Member HowtoForge Supporter

    I had allready tried localhost and 127 manual logins.
    Both of the ISPC config files are not touched and are default port
     
  7. Petar

    Petar Member HowtoForge Supporter

    The whole graphical interface of ISPC is working with the database.
    I can create user, database, delete, change everything.
    Also from shell
    1. I dont have mysql logs
    2. I cannot update ISPC
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you likely missed undoing a change in the mysql config files you made. The ISPConfig installer uses tools like mysqldump or mysqlcheck which might read global configs and they can fail if the global config is not correct.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    So ISPConfig works, you just can't install updates at the moment until you revert the global mysql changes you made. Which means you can create the site in ISPConfig that you urgently need.
     
  10. Petar

    Petar Member HowtoForge Supporter

    The changing of Mysql settings was an assumption.
    Not being able to update ispconfig in the future would be a huge problem.
    I will try to diagnose with putting a lot of echo 1,2,3 until i find what is the command that is failing and then diagnose from there.

    Any idea about the debug diagnostic message:
    01.08.2024-11:21 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Successful execution of the check_phpini_changes function from webserver_plugin. Accrding to you, ISPConfig works fine, so using debug mode makes no sense here.

    Your problem is a global change in your MySQL config that prevents the updater from working. And which command it is that fails is mentioned in your first post:

    so what fails here is the Linux command "mysqlcheck" which is run during update to check the health of the dbispconfig database.
     
  12. Petar

    Petar Member HowtoForge Supporter

    Running mysqlcheck -c -u root -p --all-databases i working fine from shell.
    What other mysql config file there should be to check?
    /etc/mysql/my.cnf is ok
     
  13. Petar

    Petar Member HowtoForge Supporter

    I just found one big change and it was not done by me

    /etc/mysql/mariadb.conf.d/50-server.cnf

    #
    # * Basic Settings
    #

    #user = mysql
    pid-file = /run/mysqld/mysqld.pid
    basedir = /usr
    #datadir = /var/lib/mysql
    #tmpdir = /tmp

    -------------
    On all the other servers i have here:

    #
    # * Basic Settings
    #

    user = mysql
    pid-file = /run/mysqld/mysqld.pid
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    lc-messages-dir = /usr/share/mysql
    lc-messages = en_US
    skip-external-locking
     

Share This Page