用户验证
** mysql 8.0 更新了默认这验证方式,会导致PHP在使用时提示
The server requested authentication method unknown to the client
解决方式
更改验证方式 -> 更新老用户密码
vim my.conf
[mysqld]
default_authentication_plugin=mysql_native_password
service mysqld restart
mysql -uroot -p
use mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的密码';
## 以上只是root用户的变更,其他用户通用,也可以删除后重新添加
MySQL 执行顺序
1、执行FROM语句
2、执行ON过滤
3、添加外部行
4、执行where条件过滤
5、执行group by分组语句
6、执行having
7、select列表
8、执行distinct去重复数据
9、执行order by字句
10、执行limit字句