如何安装mysql5.7rpm包
时间: 2023-11-16 14:57:07 浏览: 108
如果你想在CentOS7中安装mysql5.7rpm包,可以按照以下步骤进行操作:
1. 下载mysql5.7rpm包,可以使用以下命令下载:
wget \
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-client-5.7.32-1.el7.x86_64.rpm \
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-common-5.7.32-1.el7.x86_64.rpm \
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-libs-5.7.32-1.el7.x86_64.rpm \
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-libs-compat-5.7.32-1.el7.x86_64.rpm \
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-server-5.7.32-1.el7.x86_64.rpm
2. 安装依赖文件,使用以下命令安装需要的依赖包:
yum install -y mysql-community-*-5.7.32-1.el7.x86_64.rpm
3. 安装完成后,启动mysql服务:
systemctl start mysqld
4. 设置mysql开机自启动:
systemctl enable mysqld
5. 查看mysql服务状态:
systemctl status mysqld
阅读全文