After update to Debian 12 MySql missing so cant update ISPConfig

Discussion in 'General' started by daniele2812te, Dec 10, 2024.

  1. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Hi, i have used your guide to update my Debian 10 because Joomla 5 need to update MariaDB to new versions.
    So howtoforge.com/update-the-ispconfig-perfect-server-from-debian-10-to-debian-11/
    then
    howtoforge.com/update-the-ispconfig-perfect-server-from-debian-11-to-debian-12/
    Thanks for help everyone!

    My scenario is that, Server work good, no crash, no down and all my websites with them db work good, no losing data! WOW!

    Today i had a big problem during generating/setting SSL by ISPConfig on one website (that it have DNS setting in external provider rispect of my server and i cant solve yet, but this is another problem) and then all my websites down cause ERR_CONNECTION_REFUSED!!!
    So Apache could not start etc...

    For fix it i wanted to rebuild the Apache configuration/services by ISPConfig update, but when i have done it ISPConfig tell me that it no possible because i havent MySql Installed. I tried to install on Debian without success.

    At the end i fixed it deleting the website name here /etc/apache2/sites-available.

    So my question for the future, can i solve it, update ISPConfig without MySql? Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is based on MySQL, so you can not use it or update it without it, as the update connects to MySQL. If an Debian dist upgrade removes MySQL or MariaDB, all you have to do is install it again before updating ISPConfig.

    Then you manually must have removed the SSL cert, as this causes apache to fail. Disabling the site manually by removing the symlink in sites-enabled folder is the right way to do that.

    An ISPConfig update does not rebuild any website configs. Also, rebuilding apache config from scratch won't solve your issue and is mostly not a good idea to do. It will cause more damage and if you e.g. removed the ispconfig vhost, then this can not even be restored with an ISPConfig update.
     
  3. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Thanks for reply.
    I tried install Mysql but i have this:

    The following packages have unmet dependencies:
    mariadb-client : Conflicts: virtual-mysql-client Recommends: mariadb-client-compat but it is not going to be installed
    mariadb-client-core : Conflicts: virtual-mysql-client-core
    mariadb-server-core : Conflicts: virtual-mysql-server-core
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by he ld packages.
    Im scared to try much...because i have many DB online on MariaDB..
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Let's find out what is installed:
    Code:
    dpkg --list | egrep "(mariadb|mysql)"
    It may be upgrades Debian 10 -> 11 -> 12 have caused some component not being installed. You could check with ISPConfig manuall install howto what database components are needed.
    Seems host does have a working database running. What shows
    Code:
    systemctl --state=failed
    Please run the common issues script and post result in CODE tags:https://forum.howtoforge.com/threads/please-read-before-posting.58408/
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Normally we use mariadb in ISPConfig setup, instead of mysql, I would normally re-install mariadb, not mysql, if it was removed by the upgrade.
     
  6. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Thanks Teleman for reply!

    Result:
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 12 (bookworm)
    
    [INFO] uptime:  12:15:41 up 2 days, 22:42,  3 users,  load average: 1.19, 0.84,
    0.80
    
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:            31Gi       5.5Gi        15Gi       564Mi        10Gi        25Gi
    Swap:          1.0Gi          0B       1.0Gi
    
    [INFO] systemd failed services status:
      UNIT LOAD ACTIVE SUB DESCRIPTION
    0 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.12p1
    
    [WARN] Could not use mysql command line to connect to the database. Check your m
    ysql config!
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.3.31-1~deb10u5
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.3.31
    
    ##### PORT CHECK #####
    
    [WARN] Port 25 (SMTP server) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    [WARN] Port 25 (SMTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 750694)
    [WARN] I could not determine which mail server is running.
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 760)
    [INFO] I found the following imap server(s):
            Dovecot (PID 760)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1201)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [localhost]:953         (772/named)
    [anywhere]:4190         (760/dovecot)
    [anywhere]:993          (760/dovecot)
    [anywhere]:995          (760/dovecot)
    [localhost]:10023               (799/postgrey)
    [anywhere]:3306         (901/mariadbd)
    [localhost]:11211               (769/memcached)
    [localhost]:6379                (802/redis-server)
    [localhost]:9100                (988/noderig)
    [anywhere]:110          (760/dovecot)
    [localhost]:783         (810/perl)
    [anywhere]:143          (760/dovecot)
    [anywhere]:21           (1201/pure-ftpd)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    ***.***.***.***:53              (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [localhost]:53          (772/named)
    [anywhere]:22           (854/sshd:)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:953          (772/named)
    *:*:*:*::*:443          (750694/apache2)
    *:*:*:*::*:4190         (760/dovecot)
    *:*:*:*::*:993          (760/dovecot)
    *:*:*:*::*:995          (760/dovecot)
    *:*:*:*::*:10023                (799/postgrey)
    *:*:*:*::*:3306         (901/mariadbd)
    *:*:*:*::*:6379         (802/redis-server)
    [localhost]10           (760/dovecot)
    *:*:*:*::*:783          (810/perl)
    [localhost]43           (760/dovecot)
    *:*:*:*::*:8080         (750694/apache2)
    *:*:*:*::*:80           (750694/apache2)
    *:*:*:*::*:8081         (750694/apache2)
    *:*:*:*::*:21           (1201/pure-ftpd)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::*:53           (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::**:*:*:*::*53          (772/named)
    *:*:*:*::*:22           (854/sshd:)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    f2b-pure-ftpd  6    --  [anywhere]/0            [anywhere]/0            multipor
    t dports 21
    f2b-sshd   6    --  [anywhere]/0            [anywhere]/0            multiport dp
    orts 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain f2b-pure-ftpd (1 references)
    target     prot opt source               destination
    RETURN     0    --  [anywhere]/0            [anywhere]/0
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination
    RETURN     0    --  [anywhere]/0            [anywhere]/0
    
    
    
    
    ##### LET'S ENCRYPT #####
    acme.sh is installed in /root/.acme.sh/acme.sh
    
     
  7. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Thanks ahrasis.
    Yes infact i have seen. I dont know why on my upgrading to 10-11-12 miss Mysql that is necessary for ISPConfig upgrading too. In the next release its possible build ISPConfig upgrating method by MariaDB (If I said something stupid, forgive me!).
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Your issue is not related to ISPConfig at all. It's not ISPConfig that does this Debian upgrade, and it's not ISPConfig that missed installing MariaDB after it was on the system before. It's apt and the Debian system upgrade that failed, so you might want to direct your request to the makers of the Debian Linux distribution and especially to the maintainers of the MariaDB package instead of ISPConfig.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    According to the test script, MariaDB is active and running again, so ISPConfig should also work.
     
  10. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Right till, thanks.
     
  11. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Yes im using correctly the server. Only one issue is that i should install MySql too, for update ISPConfig one day.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    No, you should not install MySQL when your system uses MariaDB and you should update ISPConfig now that your MariaDB server is installed and working again. The update just failed as you did not had a working mariaDB install before, but as you fixed that now, you can now install the update.
     
    ahrasis likes this.
  13. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    That what I was trying to say. Re-install mariadb, not mysql. Good to hear when things are working again on your side. Good job also in fixing it. Just remember not to install mysql, never mysql, as we use mariadb in all ISPConfig setup.
     
  14. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Code:
    >> 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
    
    sh: 1: mysql: not found
    sh: 1: mysqldump: not found
    PHP Warning:  chmod(): No such file or directory in /tmp/update_runner.sh.VLMeLM5Kj2/install/lib/update.lib.php on line 62
    PHP Warning:  chown(): No such file or directory in /tmp/update_runner.sh.VLMeLM5Kj2/install/lib/update.lib.php on line 63
    PHP Warning:  copy(existing_db.sql): failed to open stream: No such file or directory in /tmp/update_runner.sh.VLMeLM5Kj2/install/lib/update.lib.php on line 77
    PHP Warning:  chmod(): No such file or directory in /tmp/update_runner.sh.VLMeLM5Kj2/install/lib/update.lib.php on line 78
    PHP Warning:  chown(): No such file or directory in /tmp/update_runner.sh.VLMeLM5Kj2/install/lib/update.lib.php on line 79
    PHP Warning:  chgrp(): No such file or directory in /tmp/update_runner.sh.VLMeLM5Kj2/install/lib/update.lib.php on line 80
    Checking MariaDB version 11.6.2 .. OK
    Checking ISPConfig database .. sh: 1: mysqlcheck: not found
    OK
    sh: 1: mysql: not found
    Unable to call mysql command line with credentials from mysql_clientdb.conf
    
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    This means you just installed mariadb-server again but not the other MariaDB components that are in the package mariadb-client. Run:

    apt install mariadb-client

    and try again.
     
  16. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Code:
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    mariadb-client is already the newest version (1:11.6.2+maria~deb12).
    The following packages were automatically installed and are no longer required:
      g++-10 gnustep-base-common gnustep-base-runtime gnustep-common
      guile-2.2-libs libbison-dev libbpf0 libcbor0 libclamav9 libcupsfilters1
      libcupsimage2 libevent-2.1-6 libexif12 libffi7 libgnustep-base1.28
      libgs9-common libhavege1 libicu67 libilmbase23 libldap-2.4-2 liblua5.1-0
      libmpdec3 libncursesw5 libnetpbm10 libobjc4 libopenexr23 libperl5.28
      libperl5.32 libprocps8 libpython2.7 libpython3.7 libpython3.9
      libpython3.9-minimal libpython3.9-stdlib libruby2.5 libsgutils2-2
      libstdc++-10-dev libstrictures-perl libtfm1 libtinfo5 liburing1 libwavpack1
      libwmf-0.2-7 libwmf0.2-7 libx265-165 lua-bitop lua-cjson perl-modules-5.28
      perl-modules-5.32 php-phpseclib pigz python3-ply python3-pycurl
      ruby-did-you-mean ruby-minitest ruby-power-assert ruby-test-unit unar
    Use 'apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 160 not upgraded.
    
    Nothing :(
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run:

    ls -la /usr/bin/mysql
    ls -la /usr/bin/mysqldump

    as root user. if the files are not there, then you can try:

    apt install --reinstall mariadb-client mariadb-client-core
     
  18. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Code:
    ls -la /usr/bin/mysql
    ls -la /usr/bin/mysqldump
    ls: cannot access '/usr/bin/mysql': No such file or directory
    ls: cannot access '/usr/bin/mysqldump': No such file or directory
    root@***:~# apt install --reinstall mariadb-client mariadb-client-core
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      g++-10 gnustep-base-common gnustep-base-runtime gnustep-common
      guile-2.2-libs libbison-dev libbpf0 libcbor0 libclamav9 libcupsfilters1
      libcupsimage2 libevent-2.1-6 libexif12 libffi7 libgnustep-base1.28
      libgs9-common libhavege1 libicu67 libilmbase23 libldap-2.4-2 liblua5.1-0
      libmpdec3 libncursesw5 libnetpbm10 libobjc4 libopenexr23 libperl5.28
      libperl5.32 libprocps8 libpython2.7 libpython3.7 libpython3.9
      libpython3.9-minimal libpython3.9-stdlib libruby2.5 libsgutils2-2
      libstdc++-10-dev libstrictures-perl libtfm1 libtinfo5 liburing1 libwavpack1
      libwmf-0.2-7 libwmf0.2-7 libx265-165 lua-bitop lua-cjson perl-modules-5.28
      perl-modules-5.32 php-phpseclib pigz python3-ply python3-pycurl
      ruby-did-you-mean ruby-minitest ruby-power-assert ruby-test-unit unar
    Use 'apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 160 not upgraded.
    Need to get 3,954 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Get:1 https://dlm.mariadb.com/repo/mariadb-server/11.rolling/repo/debian bookworm/main amd64 mariadb-client amd64 1:11.6.2+maria~deb12 [3,076 kB]
    Get:2 https://dlm.mariadb.com/repo/mariadb-server/11.rolling/repo/debian bookworm/main amd64 mariadb-client-core amd64 1:11.6.2+maria~deb12 [878 kB]
    Fetched 3,954 kB in 1s (2,746 kB/s)
    (Reading database ... 95929 files and directories currently installed.)
    Preparing to unpack .../mariadb-client_1%3a11.6.2+maria~deb12_amd64.deb ...
    Unpacking mariadb-client (1:11.6.2+maria~deb12) over (1:11.6.2+maria~deb12) ...
    Preparing to unpack .../mariadb-client-core_1%3a11.6.2+maria~deb12_amd64.deb ...
    Unpacking mariadb-client-core (1:11.6.2+maria~deb12) over (1:11.6.2+maria~deb12) ...
    Setting up mariadb-client-core (1:11.6.2+maria~deb12) ...
    Setting up mariadb-client (1:11.6.2+maria~deb12) ...
    Processing triggers for mariadb-server (1:11.6.2+maria~deb12) ...
    Processing triggers for man-db (2.11.2-2) ...
    
    
    
    Again:
    
    ls -la /usr/bin/mysqldump
    ls: cannot access '/usr/bin/mysqldump': No such file or directory
    root@***:~# ls -la /usr/bin/mysqldump
    ls: cannot access '/usr/bin/mysqldump': No such file or directory
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Ahh, okay. Here we have the issue. You are not using the MariaDB packages from Debian which are used in all ISPConfig server setups:

    Code:
    Get:1 https://dlm.mariadb.com/repo/mariadb-server/11.rolling/repo/debian bookworm/main amd64 mariadb-client amd64 1:11.6.2+maria~deb12 [3,076 kB]
    Get:2 https://dlm.mariadb.com/repo/mariadb-server/11.rolling/repo/debian bookworm/main amd64 mariadb-client-core amd64 1:11.6.2+maria~deb12 [878 kB]
    The ones you are using are from MariaDB repo and incompatible with ISPConfig installer and updater, ISPConfig setups do not use these packages. The packages you use lack the client libraries for mysql under the common names 'mysql' and 'mysqldump'. You can try to create symlinks for mysql and mysqldump to the binaries that your mariadb version provides and test if it works then.
     
    ahrasis likes this.
  20. daniele2812te

    daniele2812te New Member HowtoForge Supporter

    Thanks Till, sorry but im scared to try that...and im not expert like you.
     

Share This Page