Centos7上MariaDB数据库启动问题解决

安装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

posted @ 2019-10-12 10:52  有无  阅读(795)  评论(0编辑  收藏  举报

博客记录了我学习linux过程中的一些问题及解决方法,内容可能仅适用于个人,如带来不便,望请见谅!