suse12.5 安装 mysql8.0
时间: 2023-11-14 15:08:31 浏览: 145
安装 MySQL 8.0 可以按照以下步骤进行:
1. 添加 MySQL 的 Yum 源
```
sudo rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
```
2. 安装 MySQL 8.0
```
sudo yum install mysql-community-server
```
3. 启动 MySQL 服务
```
sudo systemctl start mysqld
```
4. 查看 MySQL 服务状态
```
sudo systemctl status mysqld
```
5. 设置 MySQL 开机自启
```
sudo systemctl enable mysqld
```
6. 修改 MySQL 初始密码
MySQL 8.0 安装完成后,初始密码会被保存在日志文件中,可以通过以下命令查看:
```
sudo grep 'temporary password' /var/log/mysqld.log
```
使用初始密码登录 MySQL 后,需要修改密码:
```
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
```
阅读全文
相关推荐













