when am trying to open mysql in windows cmd by typing mysql. the following error is occuring.
ERROR 1045 (28000): Access denied for user ODBC@localhost (usin
for some reason, the ODBC user is the default username under windows even if you didn't create that user at setup time. 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.
If you are using dj-database-url check the schema in your DATABASES
https://github.com/kennethreitz/dj-database-url
MySQL is
'default': dj_database_url.config(default='mysql://USER:PASSWORD@localhost:PORT/NAME')
It solves the same error even without the PORT
You set the password with:
mysql -u user -p
Try using following command it work.
mysql --user=root --password=root_password
C:\Users\abhay kumar>mysql --user=admin --password=root..
This command is working for root user..you can access mysql tool from any where using command prompt..
C:\Users\lelaprasad>mysql --user=root --password=root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.47 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
It seems like You haven't set the Mysql server path, Set Environment Variable For MySql Server. Then restart the command prompt and enter mysql -u root-p then it asks for a password enter it. Thank you. Happy learning!
i entered in Mysql Workbench and i changed the password. It seem the password was expired. it works!