Mariadb 没有启动。控制进程退出

Mariadb doesn't starts. Control process Exited

我正在尝试使用 systemctl start mariadb 启动 mariadb,也尝试使用 sudo。

这就是它所说的

Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

我在很多地方看到过这个,但没有任何帮助。

失败,我删除了,重新安装,没有任何反应。

这是/var/log/messages

的一部分
Jun 17 18:03:09 controller systemd: Starting MariaDB 10.1 database
server... 
Jun 17 18:03:09 controller mysqld: 2016-06-17 18:03:09 140477178509440
       [Note] /usr/libexec/mysqld (mysqld 10.1.12-MariaDB) starting as process 120408 ... 
Jun 17 18:03:12 controller systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE 
Jun 17 18:04:13 controller systemd: mariadb.service: control process exited, code=exited status=3 
Jun 17 18:04:13 controller systemd: Failed to start MariaDB 10.1 database server. 
Jun 17 18:04:13 controller systemd: Unit mariadb.service entered failed state. 
Jun 17 18:04:13 controller systemd: mariadb.service failed.

我是 CentOS 和 mariadb 的新手,所以我不知道如何进行。

编辑

mariadb.log 表示

2016-06-17 19:24:39 140652810123392 [Note] Server socket created on IP: '::'.
2016-06-17 19:24:39 140652810123392 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
2016-06-17 19:24:39 140652810123392 [ERROR] Do you already have another mysqld server running on port: 3306 ? 2016-06-17 19:24:39 140652810123392 [ERROR] Aborting

这是我的my.cnf

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# This group is read by the server
#
[mysqld]
port=5555
bind-address = 10.23.77.68
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

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

我尝试在 my.cnf

中添加一行
port=5555

没有帮助,mariadb.log说的和我之前说的一样。

fuser -k 3306/tcp 将解决问题。 -k 是杀死访问文件的进程。

我是这样解决的:

  1. 安装后

  2. 运行: > mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/

  3. 然后:>mysql_secure_installation

  4. 然后:systemctl start mariadb

有了这个这个,我就可以解决了。

只需删除位置

的以下文件

/var/lib/mysql

  • ib_logfile0
  • ib_logfile1