Change MySQL root password on Perfect Server Automated ISPConfig 3 Installation - Debian 11

Discussion in 'Installation/Configuration' started by JohnnyBeGood, Oct 14, 2021.

  1. JohnnyBeGood

    JohnnyBeGood Member

    Hello,

    Followed this tutorial https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/
    on a fresh install of Debian 11. When I try to change MySQL password as explained here https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords it breaks entire MySQL.
    Any help would be appreciated!

    Code:
    root@debian11:~# service mysql stop
    root@debian11:~# mysqld_safe --skip-grant-tables &
    [1] 2710
    root@debian11:~# 211013 20:02:14 mysqld_safe Logging to syslog.
    211013 20:02:14 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
    mysql -u root    mysql -u root
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 5
    Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11
    
    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)]> use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    MariaDB [mysql]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("mynewpasswordhere");
    ERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
    Code:
    root@debian11:~# service mysql restart
    Job for mariadb.service failed because the control process exited with error code.
    See "systemctl status mariadb.service" and "journalctl -xe" for details.
    root@debian11:~# systemctl status mariadb.service
    ● mariadb.service - MariaDB 10.5.12 database server
         Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
        Drop-In: /etc/systemd/system/mysql.service.d
                 └─limits.conf
         Active: failed (Result: exit-code) since Wed 2021-10-13 20:07:44 PDT; 29s ago
           Docs: man:mariadbd(8)
                 https://mariadb.com/kb/en/library/systemd/
        Process: 3051 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
        Process: 3052 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
        Process: 3053 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   &>
        Process: 3097 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
       Main PID: 3097 (code=exited, status=1/FAILURE)
         Status: "MariaDB server is down"
            CPU: 104ms
    
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [Note] InnoDB: 10.5.12 started; log sequence number 9420241; transaction id 9375
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [Note] Plugin 'FEEDBACK' is disabled.
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins m>
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [ERROR] Failed to initialize plugins.
    Oct 13 20:07:43 debian11 mariadbd[3097]: 2021-10-13 20:07:43 0 [ERROR] Aborting
    Oct 13 20:07:44 debian11 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
    Oct 13 20:07:44 debian11 systemd[1]: mariadb.service: Failed with result 'exit-code'.
    Oct 13 20:07:44 debian11 systemd[1]: Failed to start MariaDB 10.5.12 database server.
    
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    ahrasis likes this.
  3. JohnnyBeGood

    JohnnyBeGood Member

    Thank you!
    I was able to change it! Here are the steps in case someone runs into the same issue:
    Code:
    root@debian11:~# mysql -u root -p
    Enter password:
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 39
    Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11
    
    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)]> use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    MariaDB [mysql]> ALTER USER 'root'@'localhost' IDENTIFIED BY 'mynewpasswordhere';
    Query OK, 0 rows affected (0.001 sec)
    
    MariaDB [mysql]> flush privileges;
    Query OK, 0 rows affected (0.000 sec)
    
    MariaDB [mysql]> quit
    Bye
    root@debian11:~#
     
    Last edited: Oct 14, 2021
    360bladez likes this.

Share This Page