1. 程式人生 > >使用innodb_data_file_path修改資料檔案位置,發生The server quit without updating PID file錯誤的解決原因及方法。

使用innodb_data_file_path修改資料檔案位置,發生The server quit without updating PID file錯誤的解決原因及方法。

近日,給CentOS下的MySQL配置資料檔案位置,但是每次指定到非MySQL預設安裝目錄的時候,就無法啟動,並且報“The server quit without updating PID file”錯誤。仔細檢查,是許可權錯誤,包括a. MySQL對新建的資料夾是沒有訪問許可權;b. SELinux的許可權沒有放開。

另外,有的時候ibdata1大小發生變化或者ib_logfile*(預設是ib_logfile0、ib_logfile1兩個檔案)沒有刪除也會出現類似的錯誤,如果修改許可權以後還出現錯誤, 請刪除ibdata1、ib_logfile*檔案(預設情況下資料都儲存在ibdata1檔案中,因此刪除前請備份系統資料。


下面是修改資料檔案位置的詳細方法:

1. 關閉MySQL

service mysql stop
2. 建立資料資料夾

注意,MySQL自己不會建立資料資料夾,所以如果資料夾不存在,則必須手動建立。

mkdir /home/test

3. 給新檔案及賦予mysql使用者許可權
chown -R mysql:mysql /home/test/

4. 配置SELinux
chcon -R -t mysqld_db_t /home/test/

5. 修改my.cnf

在[mysqld]節點下加入以下兩行。注意,如果innodb_data_file_path要寫成絕對路徑,則innodb_data_home_dir要留空,否則都是相對innodb_data_home_dir的相對路徑。

innodb_data_home_dir =
innodb_data_file_path=/var/lib/mysql/ibdata1:18M;/home/test5/ibdata2:10M:autoextend
6. 啟動mysql
service mysql start

附:如果是Windows平臺,則簡單得多,不需要授權,修改配置檔案即可。Windows平臺的路徑要包含在英文雙引號中,如下
innodb_data_home_dir =
innodb_data_file_path="c:/ibdata1:10M;d:/ibdata2:10M:autoextend"


相關推薦

使用innodb_data_file_path修改資料檔案位置發生The server quit without updating PID file錯誤解決原因方法

近日,給CentOS下的MySQL配置資料檔案位置,但是每次指定到非MySQL預設安裝目錄的時候,就無法啟動,並且報“The server quit without updating PID file”錯誤。仔細檢查,是許可權錯誤,包括a. MySQL對新建的資料夾是沒有訪

mysql主從同步錯誤提示The server quit without updating PID file

在安裝完lnmp後,啟動mysqld失敗,提示 [[email protected] ~]# service mysqld start Starting MySQL [確定][[email protected] ~]# service mysqld restartMySQL server

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

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

Mac下安裝mysql後無法啟動錯誤提示The server quit without updating PID file

現象: 1 sudo /usr/local/mysql/support-files/mysql.server start  提示 The server quit without updating PID file  2 點選 系統偏好設定裡的  mysql 沒有看到正常的

The server quit without updating PID file 報錯

art launch quit not date some -s install clean mysql.server start 報錯:The server quit without updating PID file (/usr/local/var/mysql/zhan

MySQL提示:The server quit without updating PID file問題的解決辦法

刪除 沒有 關閉 file title 錯誤日誌 可能 service 重新啟動 轉 http://www.jb51.net/article/48625.htm 今天網站web頁面提交內容到數據庫,發現出錯了,一直提交不了,數找了下原因,發現數據寫不進去!第一反應,重啟my

Starting MySQL....The server quit without updating PID file[失敗]/lib/mysql/ip12189.pid). 錯誤一例

bold title lan char .net 失敗 etc nbsp 啟動會 [[email protected]/* */ etc]# service mysqld startStarting MySQL....The server quit withou

啟動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

mysql Starting MySQL..The server quit without updating PID file

ati mod grep disabled 不存在 upd entos 開啟 targe 可能的原因和解決辦法 1.可能是/usr/local/mysql/data/rekfan.pid文件沒有寫的權限解決方法 :給予權限,執行 chown -R mysql:mysql

Mysql啟報錯報The server quit without updating PID file

oca use log pre user ado 1.5 tle 分享 mysql 安裝時候安裝後啟動不成功報錯:Starting MySQL.. ERROR! The server quit without updating PID file (/data/mysql/2

解決報錯:The server quit without updating PID file

MySQL 報錯 The 今天晚上要做一個開啟MySQL bin-log日誌的變更。在關閉數據庫後,修改參數文件,在mysqld下加上(一定要在mysqld下加上),即可開啟mysql的binlog日誌[mysqld]log-bin=mysql-bin修改完參數後啟動數據庫,數據庫無法啟動,報一下

mysql-Starting MySQL..The server quit without updating PID file (/[FAILED]ql/mysql/pid)

報警 短信報警 touch stop MF 網站 back comm 問題 淩晨1點,日常刷刷手機中,郵箱短信報警了,瞄了一眼,磁盤什麽什麽的,沒在意,每天幾十封郵件,麻木了。早上7點,還沒醒,老大給我打電話,網站502了,一個激靈起來登陸網站,發現502了 查看進程,發現

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

The server quit without updating PID file

目錄 安裝 mys 機器 pda 服務 sql安裝 重啟 報錯 環境:安裝好mysql從另一臺機器拷貝mysql到現環境重啟mysql報錯的解決方式如下1、把mysql安裝目錄全部給mysql用戶權限chown -R mysql: /data/mysql 2、查看配置文件定

解決mysql:The server quit without updating PID file

根目錄 ima ali 用戶 ctrl+ user 服務 section src 一、卸載原來的mysql出現這種錯誤極有可能是上一個mysql的殘留文件沒有刪除,在/etc目錄下查找有沒有my.cnf文件,如果有刪除它 rm -rf my.cnf。再去/usr/local

mysql-The-server-quit-without-updating-PID-file

mysql 編譯後執行 /etc/init.d/mysqld start 啟動失敗 提示:"The server quit without updating PID file" 排查思路: 尋找配置檔案 --》尋找錯誤日誌 --》 根據日誌排查錯誤 grep -i log /etc/my.cnf

Starting MySQL...The server quit without updating PID file [失敗]lib/mysql/localhost.localdomain.pid).

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

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

報錯: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提示The server quit without updating PID file /usr/local/mysql/data/localhost.localdomain.pid

The server quit without updating PID file (/usr/local/mysql/var/xxx.pid). ... failed錯誤解決 錯誤資訊詳細描述: [email protected]:~# service mysql start