gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 23:29:21 24 4
gpt4 key购买 nike

我正在尝试使用 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

这是我的.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 说的和我之前提到的一样。

最佳答案

我是这样解决的:

  1. 安装后

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

  3. 然后:>mysql_secure_installation

  4. 然后:systemctl start mariadb

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

关于mysql - Mariadb 没有启动。控制进程退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37892351/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com