. Advertisement .
..3..
. Advertisement .
..4..
Hi everyone, I’m learning about sql. While working, I try to open MySQL in Windows cmd by typing mysql. As a result, I get the message:
ERROR 1045 (28000): Access denied for user ODBC@localhost (using password: NO)
C:\Users\abhay kumar>mysql --user=admin --password=root
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password:NO)
What can I do about the “error 1045 (28000): access denied for user ‘odbc’@’localhost’ (using password: no)” issue? Is there a better approach?
The cause:
You are having a trouble with the error ”access denied for user ‘odbc’@’localhost’ (using password: no)” because you do not determine an username and give it correct password, so it will try to connect with the ODBC username that does not exist.
Solution:
You have to creat a definite username which you believe or in PHPMyAdmin you can create an ODBC user for MySQL without using a password.
However, there is no problem in the case it’s only your local development environment. If it’s in your working environment, it will leave a significant security gap.
For some reason, even though you did not create it at setup, the default username for Windows is the ODBC user. Simply type
Without specifying a username, the username will be used to attempt to connect with an ODBC username that is not present.
Try instead to specify a username you already know.
-u root
was the usernameroot
,-p
will prompt you for a password.