Access to mysql denied for user 'odbc' @ 'localhost' to database

I installed MySql5.5 and set the password during installation, but when I try to use mysql from the Windows command line, I get the error message:

access denied for user 'odbc'@'localhost' to database password = 'YES' 

I would like to change it back to "root @localhost" as well as reset the password, but I can not enter mysql.

How do I log in to mysql using root?

+4
source share
2 answers

Are you trying to use the mysql interactive shell? You can specify usernames on the command line:

 c:\> mysql -u root -p 

Where

 -u = specify username -p = prompt for password 
+9
source

You go into mysql with the default user without permissions, you need to log in as the root user if you want to do everything:

 C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql.exe -u root -p Enter Password: ***** 

If you have never specified a root password, it should be blank; if you did, you must remember what it was, or find out how to reset the root password.

0
source

Source: https://habr.com/ru/post/1393449/


All Articles