鲲鹏-ARM-欧拉os 2.8安装mysql
# 前言
欧拉os和鲲鹏生态越来越好,很多应用已经不需要源码安装了
# 环境:euler OS 2.8
```shell
# cat /etc/os-release
NAME="EulerOS"
VERSION="2.0 (SP8)"
ID="euleros"
ID_LIKE="rhel fedora centos"
VERSION_ID="2.0"
PRETTY_NAME="EulerOS 2.0 (SP8)"
ANSI_COLOR="0;31"
```
# 安装依赖
```shell
yum install bison* ncurses*
```
# 下载社区版mysql
```shell
wget https://repo.huaweicloud.com/mysql/Downloads/MySQL-8.0/mysql-community-common-8.0.18-1.el7.aarch64.rpm
wget https://repo.huaweicloud.com/mysql/Downloads/MySQL-8.0/mysql-community-libs-8.0.18-1.el7.aarch64.rpm
wget https://repo.huaweicloud.com/mysql/Downloads/MySQL-8.0/mysql-community-client-8.0.18-1.el7.aarch64.rpm
wget https://repo.huaweicloud.com/mysql/Downloads/MySQL-8.0/mysql-community-server-8.0.18-1.el7.aarch64.rpm
```
# 安装
```shell
rpm -ivh mysql-community-common-8.0.18-1.el7.aarch64.rpm
rpm -ivh mysql-community-libs-8.0.18-1.el7.aarch64.rpm
rpm -ivh mysql-community-client-8.0.18-1.el7.aarch64.rpm
rpm -ivh mysql-community-server-8.0.18-1.el7.aarch64.rpm
```
如果碰到下面的问题:
```shell
]# rpm -ivh /root/mysql-community-client-8.0.18-1.el7.aarch64.rpm
warning: /root/mysql-community-client-8.0.18-1.el7.aarch64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
libncurses.so.5()(64bit) is needed by mysql-community-client-8.0.18-1.el7.aarch64
libtinfo.so.5()(64bit) is needed by mysql-community-client-8.0.18-1.el7.aarch64
```
可以--nodeps --force跳过:
```shell
# rpm -ivh /root/mysql-community-client-8.0.18-1.el7.aarch64.rpm --nodeps --force
warning: /root/mysql-community-client-8.0.18-1.el7.aarch64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:mysql-community-client-8.0.18-1.e################################# [100%]
```
# 启动mysqld
```shell
# systemctl start mysqld
# systemctl status mysqld
mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-05-28 10:40:13 CST; 26s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 5581 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 6089 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 21273)
Memory: 638.7M
CGroup: /system.slice/mysqld.service
6089 /usr/sbin/mysqld
May 28 10:39:39 host-172-16-100-188 systemd[1]: Starting MySQL Server...
May 28 10:40:13 host-172-16-100-188 systemd[1]: Started MySQL Server
```
# 查看初始密码:
```shell
# cat /var/log/mysqld.log
2020-05-28T02:40:06.880856Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.18) initializing of server in progress as process 5958
2020-05-28T02:40:09.346658Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: bA6eBeowau<1
2020-05-28T02:40:12.963252Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 6089
2020-05-28T02:40:13.446960Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-05-28T02:40:13.501516Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL.
2020-05-28T02:40:13.573300Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
```
# 用初始密码登录并修改密码:
```shell
# mysql -u root -p
Enter password:
mysql> alter user 'root'@'localhost' identified by 'YOUR_PAASWORD';
Query OK, 0 rows affected (0.01 sec)
```
- 点赞
- 收藏
- 关注作者
评论(0)