how to overcome ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) permanently

前端 未结 14 1422
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-23 13:49

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         


        
相关标签:
14条回答
  • 2020-12-23 14:07

    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.

    0 讨论(0)
  • 2020-12-23 14:11

    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 
    
    0 讨论(0)
  • 2020-12-23 14:12

    Try using following command it work.

    mysql --user=root --password=root_password
    
    0 讨论(0)
  • 2020-12-23 14:14
    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.
    
    0 讨论(0)
  • 2020-12-23 14:14

    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!

    0 讨论(0)
  • 2020-12-23 14:15

    i entered in Mysql Workbench and i changed the password. It seem the password was expired. it works!

    0 讨论(0)
提交回复
热议问题