MySQL常见问题解决
命令类:
- 修改密码命令:
- mysqladmin -uroot -p原密码 password 新密码(-p后直接加密码,无空格)
eg:
mysqladmin -uroot -p123456 password wangbo1012
报错类:
- Client does not support authentication protocol requested by server
-
- ①定位到mysql安装目录bin文件下
- eg:(安装在D盘下)
d:
cd D:\Program\MySQL\mysql-8.0.14-winx64\bin
eg:
mysql -hlocalhost -uroot -pwangbo1012 - eg:(安装在D盘下)
- ③执行以下命令:
use mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码';
flush privileges;
- ①定位到mysql安装目录bin文件下