添加" safe-show-database"时,Mysqld服务在启动时就会停止。到my.cnf文件

时间:2016-09-14 13:12:47

标签: mysql centos7 systemd

我在最小的Centos 7盒子上新安装了Mysqld 5.6.33。

使用以下/ec/my.cnf文件成功启动:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 728M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql

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

# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

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

但是当我添加" safe-show-database"线路到[mysqld]它停止启动,永远挂出状态

sudo systemctl status mysqld -l
● mysqld.service - MySQL Community Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: activating (start-post) since T  2016-09-14 13:03:04 UTC; 4s ago
  Process: 1580 ExecStart=/usr/bin/mysqld_safe (code=exited, status=0/SUCCESS)
  Process: 1569 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 1580 (code=exited, status=0/SUCCESS);         : 1584 (mysql-systemd-s)
   CGroup: /system.slice/mysqld.service
           └─control
             ├─1584 /bin/bash /usr/bin/mysql-systemd-start post
             └─1851 sleep 1

sep 14 13:03:04 db systemd[1]: Starting MySQL Community Server...
sep 14 13:03:04 db mysqld_safe[1580]: 160914 13:03:04 mysqld_safe Logging to '/var/log/mysqld.log'.
sep 14 13:03:04 db mysqld_safe[1580]: 160914 13:03:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

日志中没有任何内容。

我试过禁用SELinus但没有运气。

我还应该做些什么来解决这个问题?

1 个答案:

答案 0 :(得分:0)

来自docs: " - 在MySQL 5.5.3中删除了safe-show-database。"

相关问题