* Commands https://www.jianshu.com/p/1dab9a4d0d5f ** Install *** Download Package: wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm yum localinstall mysql57-community-release-el7-11.noarch.rpm *** Install yum install -y mysql-community-server ** Start systemctl start mysqld # Check Status systemctl status mysqld # 设置开机启动 shell> systemctl enable mysqld # 重载所有修改过的配置文件 shell> systemctl daemon-reload ** Password *** Get the init password when installing: grep 'temporary password' /var/log/mysqld.log mysql -uroot -p # Input password then ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; *** Update later: mysql> use mysql; mysql> update user set password=PASSWORD('MyNewPass5!') where user='root'; mysql> flush privileges; ** Restart systemctl restart mysqld ** 默认配置文件路径: 配置文件:/etc/my.cnf 日志文件:/var/log/mysqld.log 服务启动脚本:/usr/lib/systemd/system/mysqld.service socket文件:/var/run/mysqld/mysqld.pid