-
下载mysql的repo源
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
-
安装rpm包
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
-
安装mysql
sudo yum install mysql-server
-
重置密码
sudo chown -R root:root /var/lib/mysql service mysqld restart mysql -u root //直接回车进入mysql控制台 mysql > use mysql; mysql > update user set password=password('123456') where user='root'; mysql > exit;
CentOS7 安装MySQL
最新推荐文章于 2024-08-29 17:00:41 发布