标签:pre pass 默认值 var update plugin 修改 info emctl
1、进入mysql官网,下载并安装mysql8的yum源
访问https://dev.mysql.com/downloads/repo/yum/ ,下载centos7对应的mysql yum源包并上传到centos7服务器
2. 安装mysql yum源包
# rpm -ivh mysql80-community-release-el7-3.noarch.rpm
# yum install mysql mysql-server -y #安装mysql,默认就是安装mysql8版本
# systemctl start mysqld #启动mysql服务
# cat /var/log/mysqld.log #查看mysql初始密码
3、修改mysql密码
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘China123456$‘;
4、支持远程连接
mysql> use mysql mysql> select host,user,plugin from user; mysql> update user set host=‘%‘ where user =‘root‘; mysql> FLUSH PRIVILEGES;
5、字符集
从Mysql8.0开始,默认值的字符集为utf8mb4,不再是latin1。基本上不用再为字符集操心了。
标签:pre pass 默认值 var update plugin 修改 info emctl
原文地址:https://www.cnblogs.com/John-2011/p/14832338.html