MYSQL error: 1045 (28000): Access denied for user 'root'@'localhost'

后端 未结 3 966
谎友^
谎友^ 2021-01-05 16:16

When I try to connect to the sql server and enter the following in command prompt:

shell> mysql --user=username--password=password db_name
3条回答
  •  独厮守ぢ
    2021-01-05 17:00

    On Windows -

    1. Search for services
    2. Stop the service named MySQL[#] (in my case it was MySQL80).
    3. Start the service again.
    4. Open Command Prompt and type:

      mysql [database name] -u [user name] -p

    It worked for me when no other solutions worked. Hope this solves your issue as well.

提交回复
热议问题