1. 程式人生 > >mysql啟動報錯:Starting MySQL... ERROR! The server quit without updating PID file

mysql啟動報錯:Starting MySQL... ERROR! The server quit without updating PID file

mysql啟動時報錯:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解決方法:

1、可能是/opt/mysql/data/資料目錄mysql使用者沒有許可權(修改資料目錄的許可權)

   解決方法 :給予許可權,執行  "chown -R mysql.mysql /opt/mysql/data"  然後重新啟動mysqld

2、可能程序裡已經存在mysql程序

   解決方法:用命令“ps -ef|grep mysqld”檢視是否有mysqld程序,如果有使用“kill -9  程序號”殺死,然後重新啟動mysqld!

3、可能是第二次在機器上安裝mysql,有殘餘資料影響了服務的啟動。

   解決方法:去mysql的二進位制日誌目錄看看,如果存在mysql-binlog.index,就趕快把它刪除掉吧

4、mysql在啟動時沒有指定配置檔案時會使用/etc/my.cnf配置檔案,請開啟這個檔案檢視在[mysqld]下有沒有指定資料目錄(datadir)。

   解決方法:請在[mysqld]下設定這一行:datadir = /opt/mysql/data

5、skip-federated欄位問題

   解決方法:檢查一下/etc/my.cnf檔案中有沒有沒被註釋掉的skip-federated欄位,如果有就立即註釋掉吧。

6、錯誤日誌目錄不存在

   解決方法:使用“chown” “chmod”命令賦予mysql所有者及許可權

7、selinux惹的禍,如果是centos系統,預設會開啟selinux

   解決方法:先臨時改為警告模式:[[email protected] php]# setenforce 0

             然後開啟/etc/sysconfig/selinux,把SELINUX=enforcing改為SELINUX=disabled

附加:

經驗之談:

還有一個原因可能是:

檢視配置檔案/usr/local/mysql/my.cnf裡有沒有innodb_buffer_pool_size這個引數

innodb_buffer_pool_size

主要作用是快取innodb表的索引,資料,插入資料時的緩衝;

                                            預設值:128M;

                                            專用mysql伺服器設定此值的大小: 系統記憶體的70%-80%最佳。

                                            如果你的系統記憶體不大,檢視這個引數,把它的值設定小一點吧

總結:

    在配置檔案/etc/my.cnf新增錯誤日誌引數,一切問題都解決  

12[mysqld_safe]log-error = /data/mysql/logs/error.log

        啟動報錯時檢視日誌資訊:

12345678910111213141516171819202122232425262728#tail -f /data/mysql/logs/error.log160721 06:12:07 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data2016-07-21 06:12:10 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2016-07-21 06:12:10 0 [Note] /opt/mysql/bin/mysqld (mysqld 5.6.27-log) starting as process 2290 ...2016-07-21 06:12:10 2290 [Note] Plugin 'FEDERATED' is disabled.2016-07-21 06:12:10 2290 [Warning] The option innodb (skip-innodb) is deprecated and will be removed in a future release2016-07-21 06:12:10 2290 [Note] InnoDB: Using atomics to ref count buffer pool pages2016-07-21 06:12:10 2290 [Note] InnoDB: The InnoDB memory heap is disabled2016-07-21 06:12:10 2290 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2016-07-21 06:12:10 2290 [Note] InnoDB: Memory barrier is not used2016-07-21 06:12:10 2290 [Note] InnoDB: Compressed tables use zlib 1.2.32016-07-21 06:12:10 2290 [Note] InnoDB: Using CPU crc32 instructions2016-07-21 06:12:10 2290 [Note] InnoDB: Initializing buffer pool, size = 128.0M2016-07-21 06:12:10 2290 [Note] InnoDB: Completed initialization of buffer pool2016-07-21 06:12:10 2290 [Note] InnoDB: Highest supported file format is Barracuda.2016-07-21 06:12:11 2290 [Note] InnoDB: 128 rollback segment(s) are active.2016-07-21 06:12:11 2290 [Note] InnoDB: Waiting for purge to start2016-07-21 06:12:11 2290 [Note] InnoDB: 5.6.27 started; log sequence number 16259972016-07-21 06:12:11 2290 [ERROR] /opt/mysql/bin/mysqld: unknown option '--slave_parallel_workers=3'2016-07-21 06:12:11 2290 [ERROR] Aborting2016-07-21 06:12:11 2290 [Note] Binlog end2016-07-21 06:12:11 2290 [Note] Shutting down plugin 'partition'2016-07-21 06:12:11 2290 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'2016-07-21 06:12:11 2290 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'2016-07-21 06:12:11 2290 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'2016-07-21 06:12:11 2290 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'2016-07-21 06:12:11 2290 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'

     發現日誌輸出

122016-07-21 06:12:11 2290 [ERROR] /opt/mysql/bin/mysqld: unknown option '--slave_parallel_workers=3'2016-07-21 06:12:11 2290 [ERROR] Aborting

    肯定是配置檔案里加入了這個錯誤引數,去掉即可

新加報錯:

Starting MySQL.171019 10:11:54 mysqld_safe error: log-error set to '/data/tools/mysql/logs/error.log', however file don't exists. Create writable for user 'mysql'.

這是在mysql新版本:5.6.35,5.6.36的一個bug

手動建立日誌檔案:

touch /data/tools/mysql/logs/error.log

chown mysql. /data/tools/mysql/logs/error.log

/etc/init.d/mysqld start

相關推薦

mysql啟動Starting MySQL... ERROR! The server quit without updating PID file

mysql啟動時報錯:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解決方法:1、可能是/opt/mysql/data/資料目錄m

mysql啟動時報Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

.com quit blog erro selinux 打開 archive out com mysql啟動報錯Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/da

mysql啟動時報Starting MySQL... ERROR! The server quit without updating PID file ?

報錯資訊如下:MySQL server PID file could not be found!                  [FAILED]Starting MySQL.../usr/local/mysql/bin/mysqld_safe: line 181:  24

mysql啟動時報Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解決方法

#tail -f /data/mysql/logs/error.log 160721 06:12:07 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data 2016-07-21 06:12:10 0 [Warni

啟動mysql -- ERROR! The server quit without updating PID file

bash cal down tar bsp 二進制 pda you log-bin 開發說某個測試環境的mysql,無法重啟了,報以下錯誤提示: # service mysqld restart Shutting down MySQL.. SUCCESS! Starti

ERROR! The server quit without updating PID file (/usr/local/var/mysql/chenyuntekiMacBook-Air.local.pid).

在Mac上通過brew install mysql 安裝了完mysql 執行mysql.server start 報錯:ERROR! The server quit without updating PID file (/usr/local/var/mysql/chenyuntekiMacBook-Air

mysql啟動... ERROR! The server quit without updating PID file (/usr/local/mysql/data/test.pid

公司的伺服器突然斷電了,恢復後重啟mysql報錯如下 Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/data/test.pid)      &

MySql錯誤Starting MySQL...ERROR!The server quit without updating PID file

mysql初始化成功之後,然後配置了些引數,然後啟動mysql服務,結果又報錯了 照樣開始百度,網上還是一堆麻煩的方法,檢視日誌,許可權是對的,因為我這裡使用的是mysql使用者和mysql使用者組。還有一個是把本地伺服器的***.pid檔案拷貝到/usr/local/mysql/data

啟動mysql出錯Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/spark01.pi

參考檔案的連結地址:http://icesquare.com/wordpress/mysql-starting-mysql-error-the-server-quit-without-updating-pid-file/

在Centos上安裝MySQL時出現這樣的錯誤Starting MySQL.. ERROR! The server quit without updating PID file (/usr/loca

MySQL的版本是:mysql-5.5.48-linux2.6-x86_64.tar.gzcentos6.6上安裝MySQL時出現的錯誤:[[email protected] mysql]# ./support-files/mysql.server startSta

Centos6 下 Mysql啟動提示 Starting MySQL. ERROR! The server quit without updating PID file

環境說明 Centos6.5  mysql  5.5.37 問題描述 檢視mysql服務,提示mysql沒有啟動,手動啟動後,提示如下: [[email protected] ~]#

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

剛接觸MySql資料庫,參考一些文章後搭建起來了也建立了資料庫,程式跑到很好,一覺醒來突然連線不上了 MySql資料庫了。 研究了好一會才找到原因。 現象: 登入資料庫失敗 [[email protected]_0_6_centos ~]# mysql -u root -p******War

Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19

 輸入:service mysqld start  報錯:  Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19

MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解決辦法

1、問題: [[email protected] data]# /etc/init.d/mysql start Starting MySQL...The server quit without updating PID file (/db/mysql/data/i

Starting MySQL. ERROR! The server quit without updating PID file......

This step-by-step guide is mainly for FreeBSD, however the idea is the same for Linux. Every once a while, when I update my FreeBSD box, the system likes

mysql啟動ERROR! The server quit without updating PID file (/usr/local/mysql/data/gujingdeMacBook-Pro

啟動mysql時,出現如下錯誤: ERROR! The server quit without updating PID file (/usr/local/mysql/data/gujingdeMacBook-Pro.local.pid). 可能的解決方式:

Centos7啟動mysql5.6 提示ERROR! The server quit without updating PID file (/var/lib/mysql/XXX.pid).

Centos7安裝安裝MySQL-server-5.6.35-1.el7.x86_64.rpm,提示安裝失敗,因為Centos7安裝時預設安裝mariadb-libs.XXXXXX.rpm, 需要解除

fedora20 Starting MySQL. ERROR! The server quit without updating PID file /var/lib/mysql/Master.Hado

今天嘗試在fedora20下安裝了下mysql, 檢視/var/lib/mysql/Master.Hadoop.err日誌發現報瞭如下的錯於是找到這篇文章,才得以解決。 Table 'mysql.plugin' doesn't exist。 但是很不幸的是,安裝過程中出

Starting MySQL... ERROR! The server quit without updating PID file 問題解決

其中 丟失 一行 也有 index erro 報錯 估計 不清楚 今天遇到一個mysql起不來,不知為啥掛了,啟動是下面的報錯 Starting MySQL... ERROR! The server quit without updating PID file 後來進到/u

mysql 啟動The server quit without updating PID file (/usr/local/mysql/data/ubuntu.pid)

這個錯誤算是比較粗心時範的,忘切換使用者了,就是hadoop使用者沒有執行mysql的許可權,如下: [email protected]:/usr/local/mysql$ support-files/mysql.server start Starting MyS