1

I have tried starting the mysql server but unanle to do so. I have changed the password which I am using while connecting to database, other things(hostname, port and username) remained same.

I have already checked mysql service in taskmanager, tried starting from command line and from mysql shell but still not able to succees.

C:\Program Files\MySQL\mysql-8.0.21-winx64\mysql-8.0.21-winx64\bin>mysql -u root -p Enter password: ************** ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

C:\Program Files\MySQL\mysql-8.0.21-winx64\mysql-8.0.21-winx64\bin>mysql start ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

Any help would be greatly appreciated.

Please find below the screenshots of the error.

cmd_error

taskmanager

workbench1

workbench2

Prakriti Shaurya
  • 187
  • 1
  • 3
  • 14
  • https://stackoverflow.com/questions/20353402/access-denied-for-user-testlocalhost-using-password-yes-except-root-user – Cyrille Con Morales Sep 14 '20 at 08:03
  • Thank you for help, but I have already tried all the suggested methods mentioned in the post. After some google search I found that there were two mysql services (MySQL and MySQL80) running. I stopped the mysql service and started the Mysql80 service. This resolved my issue. – Prakriti Shaurya Sep 14 '20 at 09:28

4 Answers4

5

I was facing the same error. I could connect using terminal but not using workbench.

I follow these steps and it worked for me: https://phoenixnap.com/kb/access-denied-for-user-root-localhost

I run this command:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'insert_password';

and then it was possible to access without admin privileges.

1

Everytime I open the mysql workbench, I see the access denied error 'root'@'localhost'. The below resolution works for me:

  1. Open taskmanager
  2. Go to service tab
  3. Open services
  4. For me, two services run MySQL and MySQL80.
  5. I stop the MySQL service and start the MySQL80 service.
  6. This resolves my issue.
Prakriti Shaurya
  • 187
  • 1
  • 3
  • 14
0

After some google search, I found that there were two services MySQL and MySQL80 running in the services tab of task manager. I stopped the MySQL and started the MySQL80 service. This resolved my issue.

Prakriti Shaurya
  • 187
  • 1
  • 3
  • 14
0
  1. Go to C:/XAMPP/mysql/bin/

  2. open my.ini (configuration setting type file)

  3. under # The mysql server [mysqld] add a new line just after above heading and write skip-grant-tables enter image description here

  4. ctrl+s (save)

  5. open XAMPP control panel and click stop if your mysql server is already running and then click start again basically we are restarting the server and boom your problem is solved open workbench and try again to create a new connection.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
juke box
  • 11
  • 1