“Connect failed: Access denied for user ‘root’@’localhost’ (using password: YES)” mysql 5.7

  1. mysql -u root -p -h localhost

    I created a new user with

    CREATE USER 'francesco'@'localhost' IDENTIFIED BY 'some_pass';

    then I created the database

    CREATE DATABASE test;

    I granted privileges for new user for this database

    GRANT ALL PRIVILEGES ON test.* TO 'francesco'@'localhost';

    Then I logged out root and logged in new user

    quit;
    mysql -u francesco -p -h localhost
Facebook Comments

You may also like