PHP无法连接MYSQL8.0一般处理办法
以 mysql_native_password 加密方式修改密码
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘password‘; #更新一下用户的密码
FLUSH PRIVILEGES; #刷新权限
修改MYSQL.INI
mysql8.0 默认用户加密方式为caching_sha2_password,默认编码为utf8mb4
修改默认加密方式,默认编码
[mysqld]
character-set-server=utf8
default_authentication_plugin=mysql_native_password
[mysql]
default-character-set=utf8
[client]
default-character-set=utf8
重启MYSQL 服务
相关推荐
lpfvip00 2020-10-07
yifangs 2020-10-13
CoderToy 2020-11-16
emmm00 2020-11-17
王艺强 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11