mysql access denied for user ‘root’@’localhost’ (using password yes)
Possible cases:
- Wrong password
- connecting wrong Database or database not exist
- insufficient privileges for the user to access the database,
- user who doesn’t exist on the MySQL server
- User exists but client host does not have permission to connect:
- No global privilege
skip-grant-tables (last step)
password Authentication plugin maybe different
note: mysql 8 removed password column in mysql.users table
cause 1 wrong password
solution: Change or update MySQL user password using UPDATE statement
Solution 2: Grant all required privileges or permissions to user
Case 3: client host does not have permission to connect:
hosts:
localhost, same machine
possible solution 1 : Allow remote ip connections
mysql access denied for user ‘root’@’localhost’ (using password no) linux
- there maybe a password for mysql user and you not entered.
- Possible all other errors with using password no
error 1045 mysql 28000 linux in phpmyadmin
useraccounts>>select user & edit previligios>> change password.
or Databases>>mysql>>users table>. select users>> and change the password column with native password plugin. authentication type md5.
check wordpress password reset using phpmyadmin.
mysql password working shell client but not from the script client
- authentication method that the plugin implements may or may not use a password stored in the user table.
- Passwords stored in the user table are encrypted using plugin-specific algorithms
- ASCII characters (A-Z, 0-9, and dashes (-))vs non-ASCII characters>> client applications should call the mysql_options()
Set a password in ASCII and try
UPDATE user SET authentication_string = PASSWORD(‘Raazk23@#123’) WHERE user = ‘newrelic’ AND host = ‘localhost’;
mysql -u root -p
UPDATE user SET authentication_string = PASSWORD(‘Raazk23-234’) WHERE user = ‘newrelic’ AND host = ‘127.0.0.1’;
or
mysql> ALTER USER ‘newrelic’@’127.0.0.1’ IDENTIFIED WITH mysql_native_password BY ‘Raazk23-234’;
Query OK, 0 rows affected (0.01 sec)