How To Reset MySQL Or MariaDB Root Password

Reset MySQL Or MariaDB Root Password

2 Responses

  1. matthew says:

    By mariadb 10 (10.0.38-0ubuntu0.16.04.1) this no longer works as expected. Password is set in the mysql.user database but (1) as root it pays no attention to the password, you can type anything or nothing at the password prompt and you can log in and (2) as any other user ‘mysql -u root -p’ rejects the password.

  2. Nissaar says:

    Run ‘ sudo mysql -u root -p ‘ instead of ‘ mysql -u root -p ‘
    It should work

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.