安装MariaDB数据库后出现服务启动失败问题,

解决办法:卸载再安装!(确定无3306端口占用)

一、卸载数据库: [root@localhost logs]# yum -y remove mariadb*

二、删除数据库文件: [root@localhost logs]# rm -rf /var/lib/mysql/*

三、安装数据库: yum -y install mariadb mariadb-server

确定my.cnf配置文件无错

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject. org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
! includedir /etc/my.cnf.d

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2021-05-20
  • 2021-12-24
  • 2021-06-10
  • 2021-06-15
  • 2022-02-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-10-02
  • 2021-09-06
  • 2022-12-23
  • 2021-10-22
相关资源
相似解决方案