Laravel链接Mysql8注意事项

修改 my.cnf,使用原生密码

 修改 /etc/mysql/my.cnf (我是 Ubuntu 16.04),添加下面一行:

default-authentication-plugin= mysql_native_password

然后重置密码:
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

ALTER USER 'user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';


@‘loaclhost' 修改本地密码

@‘%’ 修改远程密码
 
 
posted @ 2021-06-01 18:21  7heOne  阅读(262)  评论(0编辑  收藏  举报