我在 Centos7 上安装了 mariadb,到目前为止运行良好,直到今天 mariadb 突然启动失败
systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-08-21 16:12:43 WIB; 22min ago
Process: 1712 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 1711 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 1127 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 1711 (code=exited, status=0/SUCCESS)
Aug 21 16:12:37 localhost.localdomain systemd[1]: Starting MariaDB database server...
Aug 21 16:12:38 localhost.localdomain mysqld_safe[1711]: 170821 16:12:38 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
Aug 21 16:12:38 localhost.localdomain mysqld_safe[1711]: 170821 16:12:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Aug 21 16:12:42 localhost.localdomain mysqld_safe[1711]: 170821 16:12:42 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
Aug 21 16:12:43 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
Aug 21 16:12:43 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
Aug 21 16:12:43 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Aug 21 16:12:43 localhost.localdomain systemd[1]: mariadb.service failed.
仍然不知道是什么原因造成的
这是来自 /var/lib/mysql/localhost.localdomain.err
170821 15:14:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170821 15:14:53 [ERROR] /usr/libexec/mysqld: ambiguous option '--join_buffer=1M' (join_buffer_size, join_buffer_space_limit)
170821 15:14:53 [ERROR] Aborting
170821 15:14:53 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
170821 15:15:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170821 15:15:12 [ERROR] /usr/libexec/mysqld: ambiguous option '--join_buffer=1M' (join_buffer_size, join_buffer_space_limit)
170821 15:15:12 [ERROR] Aborting
170821 15:15:12 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
170821 15:18:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170821 15:18:35 [ERROR] /usr/libexec/mysqld: ambiguous option '--join_buffer=1M' (join_buffer_size, join_buffer_space_limit)
170821 15:18:35 [ERROR] Aborting
@"/var/lib/mysql/localhost.localdomain.err"
答案1
正如 atype3 指出的那样,没有名为 join_buffer 的选项,而是 join_buffer_size:https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_join_buffer_size.因此请检查你的 my.cnf 文件。