Mysql – ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: YES)

MySQLmysql-error-1064

In my process to change password of MySQL server, I had to run this line on command

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql root -p

Which later showed error something like

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)

Please help me out with this one guys.

Best Answer

you need simply typing

mysql

without specifying a username will attempt to connect with the non-existent ODBC username, and give:

Error 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

instead, try specifying a username that you know, for example:

mysql -u root -p

where -u root specified the username root and -p will make the command prompt for a password.