当前位置:网站首页>华为云服务器安装mysqlb for mysqld.service failed because the control process exited with error code.See “sys
华为云服务器安装mysqlb for mysqld.service failed because the control process exited with error code.See “sys
2022-07-02 12:32:00 【请告诉他】
最近租了个华为云服务器,就是因为是贪图新用户折扣大,不贵,但是不太好用
一、
找到所有关于linux系统中关于mysql的文件
# find / -name '*mysql'

通过下面这个一个一个删除掉
rm -rf /usr/local/mysql
# 因为华为云上有可能默认用的是 maradb 先卸载服务器上的 mariadb 依赖
yum remove mariadb-libs
安装mysql的时候是从下面这两个地方去获得安装包
下载页面:https://downloads.mysql.com/archives/community/
下载地址:https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar
然后下载下来

解压
tar -xvf mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar得到

执行如下
# 2.依次安装mysql rpm
rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm;
rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm;
rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm;
rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.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.
[[email protected] system]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-06-28 15:12:01 CST; 18s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 21786 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=127)
Process: 21763 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
更多错误信息

处理办法
vi /etc/my.cnf
将datadir = /var/lib/mysql 改成
之后,还需要在/var/lib/mysql下执行mkdir data 如果该目录存在data文件夹则删除重新创建即可
边栏推荐
- GraphX 图计算实践之模式匹配抽取特定子图
- Introduction to Dynamic Planning II (5.647.62)
- 基于 Nebula Graph 构建百亿关系知识图谱实践
- Aiko ai Frontier promotion (7.2)
- matlab中wavedec2,说说wavedec2函数[通俗易懂]
- College entrance examination admission score line climbing
- The outline dimension function application of small motherboard
- [leetcode] 344 reverse string
- 奥比中光 astra: Could not open “2bc5/[email protected]/6“: Failed to set USB interface
- 构建多架构镜像的最佳实践
猜你喜欢

《大学“电路分析基础”课程实验合集.实验四》丨线性电路特性的研究

Comment réaliser un graphique Nebula d'importation CSV hors ligne de niveau milliard

PTA ladder game exercise set l2-001 inter city emergency rescue

Deux séquences ergodiques connues pour construire des arbres binaires

已知两种遍历序列构造二叉树

Ant group's large-scale map computing system tugraph passed the national evaluation

《大学“电路分析基础”课程实验合集.实验六》丨典型信号的观察与测量

Teach you how to build virtual machines locally and deploy microservices

Postgressql stream replication active / standby switchover primary database no read / write downtime scenario

隐藏在 Nebula Graph 背后的星辰大海
随机推荐
Experiment collection of University "Fundamentals of circuit analysis". Experiment 7 - Research on sinusoidal steady-state circuit
/Bin/ld: cannot find -lxml2
解决BASE64Encoder报错的问题
Experiment collection of University "Fundamentals of circuit analysis". Experiment 6 - observation and measurement of typical signals
6095. Strong password checker II
【Experience Cloud】如何在VsCode中取得Experience Cloud的MetaData
[salesforce] how to confirm your salesforce version?
Fiddler实现手机抓包——入门
6091. Divide the array so that the maximum difference is K
6090. Minimax games
Review materials for the special topic of analog electronics with all essence: basic amplification circuit knowledge points
《大学“电路分析基础”课程实验合集.实验七》丨正弦稳态电路的研究
/bin/ld: 找不到 -lcrypto
Locate: cannot execute stat() `/var/lib/mlocate/mlocate Db ': there is no such file or directory
Experiment collection of University "Fundamentals of circuit analysis". Experiment 4 - Research on linear circuit characteristics
Demo of converting point cloud coordinates to world coordinates
Fiddler realizes mobile packet capturing - getting started
Strings and arrays
Cultural scores of summer college entrance examination
使用FFmpeg命令行进行UDP、RTP推流(H264、TS),ffplay接收