转载:CentOS7安装MySQL(完整版)
原文地址:https://blog.csdn.net/qq_36582604/article/details/80526287
原文作者:Antelope24
下载命令如👉:[root@localhost ~]#
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
安装命令如👉:[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm
安装mysql服务器👉:[root@localhost ~]# yum -y install mysql-community-server
启动MySQL:[root@localhost ~]# systemctl start mysqld.service
查看MySQL运行状态:[root@localhost ~]# systemctl status mysqld.service
查看Mysql初始密码:[root@localhost ~]# grep "password" /var/log/mysqld.log
进入Mys数据库:[root@localhost ~]# mysql -uroot -p
修改数据库密码:mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';