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

前端 未结 14 1424
爱一瞬间的悲伤
爱一瞬间的悲伤 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:17

    Why you can't just use mysqlsh?

    PS C:\Users\artur\Desktop> mysqlsh --user root
    MySQL Shell 8.0.17
    
    Copyright (c) 2016, 2019, 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 '\?' for help; '\quit' to exit.
    Creating a session to 'root@localhost'
    Fetching schema names for autocompletion... Press ^C to stop.
    Your MySQL connection id is 13 (X protocol)
    Server version: 8.0.17 MySQL Community Server - GPL
    No default schema selected; type \use <schema> to set one.
     MySQL  localhost:33060+ ssl  JS >
    

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

    I tried this and it worked:

    C:\cd MySQL installed path\MySQL -uyourusername -pyourpassword
    
    0 讨论(0)
  • 2020-12-23 14:18

    Just create a file my.ini file in installation dir and have the below config as part of this file to solve this permanently.

    [mysql]
    user=root
    password=root
    
    0 讨论(0)
  • 2020-12-23 14:19

    I know it's been three years since this was asked, but I just figured out this problem for myself. I was using into outfile and getting the error. When I commented out this part of the query, it worked.

    The FILE privilege is separate from all the others and must be granted to the user running the script.

    GRANT FILE ON *.* TO 'asdfsdf'@'localhost';
    
    0 讨论(0)
  • 2020-12-23 14:24

    You can create user with no password in phpmyadmin and it solves the problem! Lebbar Abdelhadi,

    0 讨论(0)
  • 2020-12-23 14:26
    1. open command line (run as admin)
    2. go into Mysql server bin folder
    3. run command: mysqldump -u root -p mydbscheme > mydbscheme_dump.sql
    4. give your password here against root.

    It will work perfect !!

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