欢迎关注大数据技术架构与案例微信公众号:过往记忆大数据
过往记忆博客公众号iteblog_hadoop
欢迎关注微信公众号:
过往记忆大数据

下载Mysql源安装包

1,wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

yum安装mysql源

2,yum localinstall mysql57-community-release-el7-8.noarch.rpm

检查mysql源是否安装成功

3, yum repolist enabled | grep "mysql.*-community.*"

yum安装Mysql

4, yum install mysql-community-server

启动Mysql服务

5, systemctl start mysqld

并添加开机启动

systemctl enable mysqld systemctl daemon-reload

查看Mysql状态

6,systemctl status mysqld

查看默认的mysql密码

此时Mysql安装完成!!!

接下来修改密码

查看默认的mysql密码

 

7, vi /var/log/mysqld.log

修改mysql的密码

登录mysql: mysql -uroot -p 回车

密码: =>g6hj.Nx4e (上面查看的原始密码)

 

8, set password for 'root'@'localhost'=password('Jamie@3975');

9, 添加远程登陆的用户权限

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Jamie@3975' WITH GRANT OPTION;

10,修改mysql字符编码

vi /etc/my.cng

添加

character_set_server=utf8

init_connect='SET NAMES utf8'

11 , 重启Mysql

systemctl stop mysqld

systemctl start mysqld

12 ,查看Mysql字符集

show variables like '%character%'

本博客文章除特别声明,全部都是原创!
原创文章版权归过往记忆大数据(过往记忆)所有,未经许可不得转载。
本文链接: 【Centos 7.5 YUM安装Mysql】(https://www.iteblog.com/how_to_install_mysql_on_centos/)