mysql修改配置文件后的启动错误

修改完mysql配置文件后,重新启动报错

Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/izbp1b0a77gz.pid)

连接mysql的时候报错

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

开始以为是pid文件无法创建,mysql.sock文件也没有,一直以为是权限问题

后来才想到要去看错误日志

181204 14:52:21  InnoDB: Starting shutdown...
181204 14:52:22  InnoDB: Shutdown completed; log sequence number 1595685
181204 14:52:22 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

181204 14:52:22 [Note] Plugin 'FEDERATED' is disabled.
181204 14:52:22 InnoDB: The InnoDB memory heap is disabled
181204 14:52:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
181204 14:52:22 InnoDB: Compressed tables use zlib 1.2.7
181204 14:52:22 InnoDB: Initializing buffer pool, size = 128.0M
181204 14:52:22 InnoDB: Completed initialization of buffer pool
181204 14:52:22 InnoDB: highest supported file format is Barracuda.
181204 14:52:22  InnoDB: Waiting for the background threads to start
181204 14:52:23 InnoDB: 5.5.56 started; log sequence number 1595685
181204 14:52:23 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'explicit_defaults_for_timestamp=true'
181204 14:52:23 [ERROR] Aborting

181204 14:52:23  InnoDB: Starting shutdown...
181204 14:52:24  InnoDB: Shutdown completed; log sequence number 1595685
181204 14:52:24 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

通过日志可以看出是因为配置文件写错了 导致的

/usr/local/mysql/bin/mysqld: unknown variable 'explicit_defaults_for_timestamp=true'

就是这一行

删除了就好了

你可能感兴趣的:(mysql)