mysql - 当我登录出现错误时如何修复 MySQL?
问题描述
我可以使用路径登录到 mysql
/usr/local/mysql/bin/mysql -uroot -p
但是当我输入mysql -uroot -p
并输入我的密码时,我收到了这个错误:
错误 1045 (28000): 用户 'root'@'localhost' 的访问被拒绝(使用密码:是)
试图弄清楚为什么它仍然提示我输入密码但返回错误?是否有可能我安装了两个单独的 mysql 或者命令mysql -uroot -p
设置不正确
Andress-MacBook-Pro:~ alpha$ mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Andress-MacBook-Pro:~ alpha$ /usr/local/mysql/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.17 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
我期待使用更简单的命令同样成功登录mysql -uroot -p
解决方案
推荐阅读
- haskell - Haskell 中的通用树 = 玫瑰树?玫瑰树的海报?
- java - 如何使用 setRepeatingRequest 获取图像?
- c# - GetTokenAsync 使用 auth0 在 ASP.NET Core 2.1 中返回 2 个受众
- security - 备份 TPM(可信平台模块)
- php - 在 Woocommerce 中重命名我的帐户选项卡式菜单项
- react-native - React Native AsyncStorage 没有获得价值
- shiny - Multiple Shiny apps in ioslide presentations
- laravel - 需要laravel vue axios解释
- ios - Custom Migration - Encrypted Core Data - iOS
- ios - How do I access my swift classes from my UI tests?