密码模式
PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]
mysql8 之后,默认的密码模式改为 caching_sha2_password,新的模式需要新的驱动,至少现在 pdo / navicat 还没给出,所以我们还是得切换成老的 mysql_native_password 模式。
`mysql_native_password`:7.0 以下 `caching_sha2_password`:8.0 以上
1、my.cnf 配置默认的密码模式
[mysqld] default_authentication_plugin=mysql_native_password
2、更新账号的密码模式
# 创建新的账号 create user 'root'@'%' identified with mysql_native_password by '123456'; # 已存在的账号 alter user 'root'@'%' identified with mysql_native_password by '123456';
3、如果你需要授权
# 授权也不能兼并创建账号了,只能授权 grant all privileges on *.* to 'root'@'%' with grant option; flush privileges;
密码复杂度策略
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
密码复杂度验证策略导致的,关闭后设定即可
set global validate_password.policy=0; set global validate_password.length=6;
默认编码
PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers
设定 mysql 服务的默认编码
# Default Homebrew MySQL server config [client] default_character_set=utf8mb4 [mysql] default_character_set=utf8mb4 [mysqld] default_authentication_plugin=mysql_native_password character_set_server=utf8mb4 collation_server=utf8mb4_general_ci
远程访问
1、my.conf 注释掉本地监听
[mysqld] #bind_address=127.0.0.1
2、更新账号的 host
update mysql.user set host='%' where user='root';
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?