mysqld_safe error: log-error set to ‘/var/log/mariadb/mariadb.log‘, however file don‘t exists. Creat

linux启动mysql时报错:

mysqld_safe error: log-error set to '/var/log/mariadb/mariadb.log', however file don't exists. Create writable for user 'mysql'

解决办法:

yum list installed |grep mariadb
查看系统是否带mariadb数据库

删除系统带的mariadb数据库,法令如下:

[roo@bogon /]$ rpm -e ariadb-libs.x86_64 
错误:未安装软件包 ariadb-libs.x86_64 
[roo@bogon /]$ 
[roo@bogon /]$ systemctl start mariadb
Failed to start mariadb.service: Unit not found.
[roo@bogon /]$ sudo rm -rf /var/log/
[sudo] roo 的密码:
[roo@bogon /]$ yum list installed |grep mariadb
mariadb-libs.x86_64                         1:5.5.64-1.el7             @anaconda
[roo@bogon /]$ yum remove ariadb-libs.x86_64 
已加载插件:fastestmirror, langpacks
您需要 root 权限执行此命令。
[roo@bogon /]$ sudo yum remove ariadb-libs.x86_64 
已加载插件:fastestmirror, langpacks
参数 ariadb-libs.x86_64 没有匹配
不删除任何软件包
[roo@bogon /]$ sudo yum remove mariadb-libs.x86_64                         1:5.5.64-1.el7             @anaconda
已加载插件:fastestmirror, langpacks
参数 1:5.5.64-1.el7 没有匹配
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.cqu.edu.cn
没有名为 anaconda 的组
正在解决依赖关系
--> 正在检查事务
---> 软件包 mariadb-libs.x86_64.1.5.5.64-1.el7 将被 删除
--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 2:postfix-2.10.1-7.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 2:postfix-2.10.1-7.el7.x86_64 需要
--> 正在检查事务
---> 软件包 postfix.x86_64.2.2.10.1-7.el7 将被 删除
--> 解决依赖关系完成

依赖关系解决

============================================================================================================================================
 Package                            架构                         版本                                 源                               大小
============================================================================================================================================
正在删除:
 mariadb-libs                       x86_64                       1:5.5.64-1.el7                       @anaconda                       4.4 M
为依赖而移除:
 postfix                            x86_64                       2:2.10.1-7.el7                       @anaconda                        12 M

事务概要
============================================================================================================================================
移除  1 软件包 (+1 依赖软件包)

安装大小:17 M
是否继续?[y/N]:n
Exiting on user command
您的事务已保存,请执行:
 yum load-transaction /tmp/yum_save_tx.2022-03-06.17-02.NSaqiB.yumtx 重新执行该事务
[roo@bogon /]$ yum list installed |grep mariadb
mariadb-libs.x86_64                         1:5.5.64-1.el7             @anaconda
[roo@bogon /]$ sudo yum remove mariadb-libs.x86_64                         1:5.5.64-1.el7             @anaconda
已加载插件:fastestmirror, langpacks
参数 1:5.5.64-1.el7 没有匹配
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.cqu.edu.cn
没有名为 anaconda 的组
正在解决依赖关系
--> 正在检查事务
---> 软件包 mariadb-libs.x86_64.1.5.5.64-1.el7 将被 删除
--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 2:postfix-2.10.1-7.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 2:postfix-2.10.1-7.el7.x86_64 需要
--> 正在检查事务
---> 软件包 postfix.x86_64.2.2.10.1-7.el7 将被 删除
--> 解决依赖关系完成

依赖关系解决

============================================================================================================================================
 Package                            架构                         版本                                 源                               大小
============================================================================================================================================
正在删除:
 mariadb-libs                       x86_64                       1:5.5.64-1.el7                       @anaconda                       4.4 M
为依赖而移除:
 postfix                            x86_64                       2:2.10.1-7.el7                       @anaconda                        12 M

事务概要
============================================================================================================================================
移除  1 软件包 (+1 依赖软件包)

安装大小:17 M
是否继续?[y/N]:y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在删除    : 2:postfix-2.10.1-7.el7.x86_64                                                                                           1/2 
  正在删除    : 1:mariadb-libs-5.5.64-1.el7.x86_64                                                                                      2/2 
  验证中      : 1:mariadb-libs-5.5.64-1.el7.x86_64                                                                                      1/2 
  验证中      : 2:postfix-2.10.1-7.el7.x86_64                                                                                           2/2 

删除:
  mariadb-libs.x86_64 1:5.5.64-1.el7                                                                                                        

作为依赖被删除:
  postfix.x86_64 2:2.10.1-7.el7                                                                                                             

完毕!
[roo@bogon /]$ yum list installed |grep mariadb

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值