// 启动
> service mysqld start
// 关闭
> service mysqld stop
// 重启
> service mysqld restart
> yum install -y perl perl-Module-Build net-tools autoconf libaio numactl-libs
# 下载 mysql 源安装包
> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# 安装 mysql 源
> yum localinstall mysql57-community-release-el7-8.noarch.rpm
> yum repolist enabled | grep "mysql.*-community.*"
> yum install mysql-community-server
> systemctl start mysqld
> systemctl status mysqld
> systemctl enable mysqld
> systemctl daemon-reload
// 查看初始密码
> grep 'temporary password' /var/log/mysqld.log
// 设置新密码
> set password for 'root'@'localhost'=password('MyNewPass4!');
> GRANT ALL PRIVILEGES ON *.* TO 'testName'@'%' IDENTIFIED BY 'passWord' WITH GRANT OPTION;
> vim /etc/my.cnf
// 添加编码
[mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8'