trying to reset password in mariadb - not working

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Feb 2, 2022.

  1. pawan

    pawan Member

    Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
    what I have tried - added - skip-grant-tables in 50-server-conf.
    restarted mysql - able to reach mysql prompt.
    UPDATE user SET `authentication_string` = PASSWORD('mypassword') WHERE `User` = 'root';
    FLUSH PRIVILEGES;
    exit;restart mysql.
    still not able to login with mysql -uroot -p
    also tried - ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rdFpkeUmR5hK';
    but here I am getting error - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY
    how to resolve this?

    was able to resolve with this query.

    UPDATE
    mysql.user
    SET
    Password = PASSWORD('YOURNEWPASSWORD')
    WHERE
    User = 'root';
    FLUSH PRIVILEGES;
    exit;
     
    Last edited: Feb 2, 2022

Share This Page