mysql修改配置檔案後的啟動錯誤

2021-09-02 14:54:37 字數 1737 閱讀 1451

修改完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配置檔案的啟動方式

mysql 配置檔案載入位置與順序 1.usr local mysql bin mysqld verbose help help.txt 2 1 usr local mysql bin mysqld verbose help 這個命令生成所有mysqld選項和可配置變數的列表 然後重定向到help....

EOS啟動節點之前配置檔案的修改

啟動eos節點 nodeos 這時你會發現程式不能正常執行,看不到出塊資訊,需要進行以下的操作 執行完7以後,再次啟動 修改nodeos配置檔案 local share eosio nodeos config config.ini 檢視配置檔案,按照下面的內容,替換或者新增到配置檔案中 vim lo...

MySQL讀取配置檔案的順序 啟動方式 啟動原理

一 mysql讀取配置檔案的順序 讀取順序 etc my.cnf etc mysql my.cnf usr etc my.cnf my.cnf 命令驗證 root mysql mysql verbose help grep my.cnf order of preference,my.cnf,mysq...