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

    Hi,

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

    Code:
    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 https://www.howtoforge.com/communit...ed-for-user-root-localhost.77178/#post-364462, it didn't change a thing in phpmyadmin, but after the changes, even 'mysql -u root -p' appears to be blocked:

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

    /z
     
    Last edited: Jun 29, 2019
  2. zenny

    zenny Member

    SOLUTION 1:
    SOLVED by resetting the 'root' password (for record):
    Code:
    # 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
    SOLUTION 2:
    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 https://www.howtoforge.com/communit...ed-for-user-root-localhost.77178/#post-364462:
    Code:
    # 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.

    Cheers,
    /z
     
    gbo and ahrasis like this.

Share This Page