下载对应的mysql
阿里源:阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区
华为开源镜像站_软件开发服务_华为云 华为源: 华为开源镜像站_软件开发服务_华为云
选择华为鲲鹏镜像
https://repo.huaweicloud.com/kunpeng/yum/el/7/aarch64/
下载mysql
wget https://repo.huaweicloud.com/kunpeng/yum/el/7/aarch64/Packages/database/mysql-5.7.27-1.el7.aarch64.rpm
安装mysql
rpm -ivh mysql-5.7.27-1.el7.aarch64.rpm
找到 mysqld
启动mysql
进入安装的bin 目录
cd /usr/local/mysql/bin/
启动 ./mysqld --user=root --initialize
报错:mysqld: Can't create directory '/data/mysql/data/' (Errcode: 2 - No such file or directory)
手动创建
mkdir -pv /data/mysql/data
再次 启动 ./mysqld --user=root --initialize
A temporary password is generated for root@localhost: eY!A>0R%iqOr
为生成临时密码root@localhost:eY!A> 0R%iqOr