redhat7安装mysql5.7
时间: 2023-10-24 14:28:38 浏览: 123
在Red Hat 7上安装MySQL 5.7的步骤如下示:
1. 首先,下载MySQL 5.7的yum源。使用以下命令下载yum源:
```
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
```
2. 下载完成后,安装yum源。使用以下命令安装:
```
rpm -ivh mysql-community-release-el7-5.noarch.rpm
```
3. 安装完成后,检查是否成功安装了MySQL。使用以下命令检查:
```
rpm -qa | grep mysql
```
4. 如果系统中已经安装了mariadb-libs,需要先卸载它,以避免冲突:
```
yum remove mariadb-libs
```
5. 如果系统中没有安装net-tools,需要先安装它:
```
yum install net-tools -y
```
6. 安装MySQL 5.7。使用以下命令安装:
```
rpm -ivh mysql-community-client-5.7.37-1.el7.x86_64.rpm mysql-community-common-5.7.37-1.el7.x86_64.rpm mysql-community-libs-5.7.37-1.el7.x86_64.rpm mysql-community-server-5.7.37-1.el7.x86_64.rpm
```
7. 启动MySQL服务:
```
systemctl start mysqld
```
8. 使用临时密码登录MySQL,并修改密码。
这样,你就成功在Red Hat 7上安装了MySQL 5.7。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [RedHat7.x环境下MySQL5.7的安装、配置和远程连接](https://blog.csdn.net/weixin_45573645/article/details/104965146)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [linux系统中三种方法安装MySQL5.7(rhel7/centos7)](https://blog.csdn.net/weixin_52951697/article/details/123766776)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文