ispconfig3 in ubuntu 18.04: mysqli_real_connect(): (HY000/1698): Access denied for user 'root'

Discussion in 'Installation/Configuration' started by zenny, Jun 29, 2019.

  1. zenny

    zenny Member


    Installed ispconfig3 in ubuntu 18.04, but there appears to be a problem with the phpmyadmin as root:

    mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'
    I can access to the database in command line with 'mysql -u root -p' without a problem, fyi.

    I followed @till as appeared in, it didn't change a thing in phpmyadmin, but after the changes, even 'mysql -u root -p' appears to be blocked:

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Any clue? Thanks and cheers,

    Last edited: Jun 29, 2019
  2. zenny

    zenny Member

    SOLVED by resetting the 'root' password (for record):
    # mysqld_safe --skip-grant-tables &
    # mysqld_safe --skip-grant-tables
    # mysql -u root
    MariaDB [(none)]> use mysql;
    MariaDB [mysql]> update user set password=PASSWORD("YourChosenPassword") where user='root';
    MariaDB [mysql]> flush privileges;
    MariaDB [mysql]> quit;
    # service mysql restart
    #mysql -u root -p YourChosenPassword
    Another way to achieve the same by creating a new PHPMyAdmin user (pmauser) with root privileges if you are not locked without root access without making any changes described at
    # mysql -u root -p
    MariaDB [(none)]> CREATE USER 'pmauser'@'%' IDENTIFIED BY 'YourChosenPassword';
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'%' WITH GRANT OPTION;
    MariaDB [(none)]> flush privileges;
    MariaDB [(none)]> quit;
    Hope this is helpful for someone who had similar issues in the future.

    gbo and ahrasis like this.

Share This Page