use mysql;
select host,user,plugin,authentication_string from user;
更新密码:
update user set plugin="mysql_native_password",authentication_string=password('Yjh123456`') where user="root";
刷新权限
FLUSH PRIVILEGES;
上面已经完成安装
更改数据库的编码,先登录数据库
SHOW VARIABLES LIKE 'char%'; -- 显示数据编码
CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;--设置新建数据库默认编码为utf8
Reply Like 0 View the author
亚历山大一世
deepin
2019-08-10 03:14
#4
和mysql一样的
Reply Like 0 View the author
Feng Yu
deepin
2019-08-10 03:32
#5
mysql 5.7授权方式改了,root默认必须使用unix domain socket连接。你需要去看官方文档了解详情