当前位置:网站首页>操作系统迁移实战之在openEuler上部署MySQL数据库
操作系统迁移实战之在openEuler上部署MySQL数据库
2022-07-26 15:51:00 【InfoQ】
写在前面的话
1.简要介绍
2.环境



3.软件兼容性评估
3.1获取mysql的RPM包并解压到/opt/mysql目录下
wget –P /opt https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.21-1.el7.x86_64.rpm-bundle.tar
cd /opt/
mkdir mysql
tar -xf mysql-5.7.21-1.el7.x86_64.rpm-bundle.tar -C mysql
3.2下载x2openEuler工具到/opt/mysql
下载指引:https://www.openeuler.org/zh/other/migration/
3.3部署工具
cd /opt/mysql
rpm -ivh x2openEuler-2.0.0-1.x86_64.rpm
su x2openEuler
x2openEuler redis-db -init
x2openEuler init source_centos7.6-openEuler20.03-LTS-SP1.tar.gz
3.4扫描mysql
x2openEuler scan /opt/mysql/
注意要分析的移植文件需要有能够让x2openEuler用户可以读取的权限
扫描完成后会在/opt/x2openEuler/output目录生成html格式的报告
4.评估结果分析
4.1报告分析


4.2分析结果建议
建议:由于函数调用风险,建议直接使用在openEuler官方编译移植过的mysql-5.7.21系列软件包
https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/x86_64/Packages/mysql5-5.7.21-3.oe1.x86_64.rpm
https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/x86_64/Packages/mariadb-common-10.3.9-9.oe1.x86_64.rpm
https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/x86_64/Packages/mysql5-common-5.7.21-3.oe1.x86_64.rpm
https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/x86_64/Packages/mysql5-server-5.7.21-3.oe1.x86_64.rpm
https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/x86_64/Packages/mysql5-errmsg-5.7.21-3.oe1.x86_64.rpm
https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/x86_64/Packages/mecab-0.996-2.oe1.x86_64.rpm
5.安装数据库mysql
5.1安装mysql并配置密码
1)安装mariadb及mysql相关服务。
rpm -ivh mysql5-5.7.21-3.oe1.x86_64.rpm mariadb-common-10.3.9-9.oe1.x86_64.rpm mysql5-common-5.7.21-3.oe1.x86_64.rpm mysql5-server-5.7.21-3.oe1.x86_64.rpm mecab-0.996-2.oe1.x86_64.rpm mysql5-errmsg-5.7.21-3.oe1.x86_64.rpm
2) 启动mysql。
systemctl start mysqld
3)mysql状态查询。
[email protected] ~# systemctl status mysqld
● mysqld.service - MySQL 5.7 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2021-09-09 10:23:25 CST; 1 day 4h ago
Process: 103715 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
Process: 103738 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, sta>
Process: 103773 ExecStart=/usr/libexec/mysqld --daemonize --basedir=/usr --pid-file=/run/mysqld>
Process: 103803 ExecStartPost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/SUCCESS)
Main PID: 103775 (mysqld)
Tasks: 37
Memory: 188.4M
CGroup: /system.slice/mysqld.service
└─103775 /usr/libexec/mysqld --daemonize --basedir=/usr --pid-file=/run/mysqld/mysqld.
4) 登录并修改默认密码。
- a. 默认没有密码,按回车即可登录。
[email protected] /# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
- b. 设置密码。
mysql> alter user 'root'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
5) 验证密码。
[email protected] /# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3Server version: 5.7.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
6.总结
参考资料:
边栏推荐
- 请问一下各位大佬,mysql-cdc建表如何指定表的字符集呢,在官网没找到相应的连接器参数。我读一个
- hawe螺旋插装式单向阀RK4
- anaconda No module named ‘cv2‘
- 13年资深开发者分享一年学习Rust经历:从必备书目到代码练习一网打尽
- 如何通过ETL调度工具 TASKCTL 使用作业插件类型调用 kettle作业?
- Super simple! It only takes a few steps to customize the weather assistant for TA!!
- 理解卷积神经网络中的权值共享
- Delta controller rmc200
- OSPF comprehensive experiment
- German EMG electric actuator eb800-60ii
猜你喜欢

一文搞懂│XSS攻击、SQL注入、CSRF攻击、DDOS攻击、DNS劫持

Parker pump pv140r1k1t1pmmc

Paper:《All Models are Wrong, but Many are Useful: 所有模型都是错误的,但许多模型都是有用的:通过同时研究一整类预测模型来了解变量的重要性》翻译与解读

Kalibr calibration realsensed435i -- multi camera calibration

【EXPDP导出数据】expdp导出23行记录,且不包含lob字段的表,居然用时48分钟,请大家帮忙看看

parker泵PV140R1K1T1PMMC

How to use job plug-in type to call a kettle job through ETL scheduling tool taskctl?

Research and application of the whole configuration of large humanoid robot

A comprehensive review of image enhancement technology in deep learning

全志A40i工业核心板,100%国产4核ARM Cortex-A7,支持“双屏异显”【显示接口能力,工业HMI首选方案】
随机推荐
parker电磁阀D1VW020DNYPZ5
绘制漂亮的中学操场轮廓,生成带经纬度数据
Super simple! It only takes a few steps to customize the weather assistant for TA!!
German EMG electric actuator eb800-60ii
Change an ergonomic chair to relieve the old waist of sitting and writing code~
邻接矩阵的COO格式
朋友圈如何测试(思维导图)
OSPF comprehensive experiment
6种方法帮你搞定SimpleDateFormat类不是线程安全的问题
机器人手眼标定Ax=xB(eye to hand和eye in hand)及平面九点法标定
If you want to be good at work, you must first use its tools -c language expansion -- embedded C language (11)
API 版本控制【 Eolink 翻译】
04 callable and common auxiliary classes
German EMG e-anji thruster ed301/6 HS
Tool skill learning (II): pre skills shell
ES6 advanced - query commodity cases
hawe螺旋插装式单向阀RK4
.net get injection object manually
Paper: all models are wrong, but many are useful: all models are wrong, but many are useful: understand the importance of variables by studying a whole class of prediction models at the same time
Bucher gear pump qx81-400r301