Failed to Connect to MySQL At 127.0.0.1:3306 With User Root Access Denied for User 'Root'@'Localhost'(Using Password:Yes)

Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?

Use the instructions for resetting the root password - but instead of resetting the root password, we'll going to forcefully INSERT a record into the mysql.user table

In the init file, use this instead

INSERT INTO mysql.user (Host, User, Password) VALUES ('%', 'root', password('YOURPASSWORD'));
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;

Failed to connect to mysql at 127.0.0.1:3306 with user root@localhost

Allow your ip address to remote access in your db if not done yet:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'your_machine_ip' IDENTIFIED BY 'password';

MySQL Error: : 'Access denied for user 'root'@'localhost'

  1. Open and edit /etc/my.cnf or /etc/mysql/my.cnf, depending on your distribution.
  2. Add skip-grant-tables under [mysqld]
  3. Restart MySQL
  4. You should be able to log in to MySQL now using the below command mysql -u root -p
  5. Run mysql> flush privileges;
  6. Set new password by ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
  7. Go back to /etc/my.cnf and remove/comment skip-grant-tables
  8. Restart MySQL
  9. Now you will be able to login with the new password mysql -u root -p

Failed to connect to MySql at 127.0.0.1:3306

Its seams your database ie (mysql) not started,
check the mysql official documentation, how to start mysql server.
If you already install the mysql server follow the below process.

[Your mysql server installation directory location]/bin\mysqld" --install



Related Topics



Leave a reply



Submit