当前位置: 首页 > news >正文

OpenEuler 安装mysql

下载安装包

建议直接使用在openEuler官方编译移植过的mysql-5.7.21系列软件包

参考:操作系统迁移实战之在openEuler上部署MySQL数据库 | 数据库迁移方案 | openEuler社区官网

MySQL 5.7.21 移植指南(openEuler 20.03 LTS SP1) | 数据库移植方案 | openEuler社区官网

下载地址:

aarch64地址:openeuler aarch64 下载地址

x86_64地址:openeuler x86-64 下载地址

 找到对应的安装包

下载

wget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mysql5-server-5.7.21-3.oe1.aarch64.rpm

安装错误提示

warning: mysql5-server-5.7.21-3.oe1.aarch64.rpm: Header V3 RSA/SHA1 Signature, key ID b25e7f66: NOKEY
error: Failed dependencies:
    libc.so.6(GLIBC_2.28)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libcrypt.so.1(XCRYPT_2.0)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libcrypto.so.1.1()(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libevent_core-2.1.so.7()(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libmecab.so.2()(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libssl.so.1.1()(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libssl.so.1.1(OPENSSL_1_1_0)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libstdc++.so.6(GLIBCXX_3.4.20)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libtirpc.so.3()(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    libtirpc.so.3(TIRPC_0.3.0)(64bit) is needed by mysql5-server-5.7.21-3.oe1.aarch64
    mysql is needed by mysql5-server-5.7.21-3.oe1.aarch64
    mysql5-common = 5.7.21-3.oe1 is needed by mysql5-server-5.7.21-3.oe1.aarch64
    mysql5-errmsg = 5.7.21-3.oe1 is needed by mysql5-server-5.7.21-3.oe1.aarch64
    shadow is needed by mysql5-server-5.7.21-3.oe1.aarch64
 

缺失什么就安装什么。

下载mysql5-common、 mysql5-errmsg

 wget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mysql5-common-5.7.21-3.oe1.aarch64.rpmwget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mysql5-errmsg-5.7.21-3.oe1.aarch64.rpmwget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mysql5-5.7.21-3.oe1.aarch64.rpmwget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mariadb-common-10.3.9-9.oe1.aarch64.rpmwget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mysql5-server-5.7.21-3.oe1.aarch64.rpmwget https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/mecab-0.996-2.oe1.aarch64.rpm

安装相关

rpm -ivh  mysql5-5.7.21-3.oe1.aarch64.rpm mariadb-common-10.3.9-9.oe1.aarch64.rpm  mysql5-common-5.7.21-3.oe1.aarch64.rpm  mysql5-errmsg-5.7.21-3.oe1.aarch64.rpm   mysql5-server-5.7.21-3.oe1.aarch64.rpm

 rpm -ivh mysql5-5.7.21-3.oe1.aarch64.rpm  --force --nodeps

 rpm -ivh mariadb-common-10.3.9-9.oe1.aarch64.rpm  --force --nodeps

 rpm -ivh mecab-0.996-2.oe1.aarch64.rpm  --force --nodeps


rpm -ivh mysql5-common-5.7.21-3.oe1.aarch64.rpm 
 

  rpm -ivh mysql5-errmsg-5.7.21-3.oe1.aarch64.rpm

 然后加上 --force --nodeps

重新安装

rpm -ivh mysql5-server-5.7.21-3.oe1.aarch64.rpm --force --nodeps

启动

 systemctl start mysqld

 报错了

Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

那就查看日志:

journalctl -xe

-- Subject: Unit mysqld.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has finished shutting down.
Aug 22 14:46:52 dc3-80-558.novalocal systemd[1]: Starting MySQL 5.7 database server...
-- Subject: Unit mysqld.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has begun starting up.
Aug 22 14:46:52 dc3-80-558.novalocal mysql-check-socket[4923]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-check-socket[4923]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-check-socket[4923]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-check-socket[4923]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: /usr/bin/my_print_defaults: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: Initializing MySQL database
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: /usr/libexec/mysqld: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: Initialization of MySQL database failed.
Aug 22 14:46:52 dc3-80-558.novalocal mysql-prepare-db-dir[4952]: Perhaps /etc/my.cnf is misconfigured.
Aug 22 14:46:52 dc3-80-558.novalocal systemd[1]: mysqld.service: control process exited, code=exited status=127
Aug 22 14:46:52 dc3-80-558.novalocal systemd[1]: Failed to start MySQL 5.7 database server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has failed.
-- 
-- The result is failed.
Aug 22 14:46:52 dc3-80-558.novalocal systemd[1]: Unit mysqld.service entered failed state.

那就继续安装openssl:

去下载 openssl-1.1.1f-1.oe1.aarch64.rpm

 

rpm -ivh openssl-1.1.1f-1.oe1.aarch64.rpm  --force --nodeps

rpm -ivh openssl-libs-1.1.1f-1.oe1.aarch64.rpm  --force --nodeps
 

 rpm -ivh glibc-common-2.28-49.oe1.aarch64.rpm  --force --nodeps

  rpm -ivh glibc-all-langpacks-2.28-49.oe1.aarch64.rpm  --force --nodeps

 rpm -ivh glibc-  --force --nodeps

http://www.lryc.cn/news/137913.html

相关文章:

  • [Docker] Windows 下基于WSL2 安装
  • (未完成)【Spring专题】SringAOP底层原理解析——阶段三(AOP)
  • 使用Nodejs创建简单的HTTP服务器,借助内网穿透工具实现公网访问的方法分享
  • 使用 OpenTelemetry 构建可观测性 03 - 导出
  • Pyqt5打开电脑摄像头进行拍照
  • Flowable 7.0.0.M2 版本功能
  • 【golang】关于指针的有限操作
  • ProGuard + SpringBoot3 + JDK17
  • Kafka面试
  • Amazon CloudFront 部署小指南(六)- Lambda@Edge 基础与诊断
  • centos7安装hadoop 单机版
  • 村口的人家排放污水,污水浸染了整个村子,怎么办
  • 算法leetcode|72. 编辑距离(rust重拳出击)
  • 实训笔记8.21
  • robust distortion-free watermarks for language models
  • PTS性能测试工具-使用记录
  • 【boost网络库从青铜到王者】第六篇:asio网络编程中的socket异步读(接收)写(发送)
  • django sqlite3操作和manage.py功能介绍
  • 【SQL语句】SQL编写规范
  • 后端项目开发:工具类封装(序列化、反射)
  • 软件测试技术分享丨遇到bug怎么分析?
  • LeetCode无重复字符的最长子串
  • 17.2.2 【Linux】通过systemctl观察系统上所有的服务
  • Redis扩容机制与一致性哈希算法解析
  • BDA初级分析——可视化基础
  • 边缘计算节点BEC典型实践:如何快速上手PC-Farm服务器?
  • python自动把内容发表到wordpress完整示例及错误解答
  • 【javaweb】学习日记Day6 - Mysql 数据库 DDL DML DQL
  • 如何利用SFTP如何实现更安全的远程文件传输 ——【内网穿透】
  • 枚举和反射