標籤:ace should and add ted 注釋 var etc create
service mysql start時報:ERROR! The server quit without updating PID file (/usr/local/mysql/data/mysql1.pid),錯誤。
1、查看error日誌:
Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
發現是由於my.cnf這個檔案配置錯誤導致的。
2、vim /etc/my.cnf
增加:
innodb_data_file_path=ibdata1:12M;ibdata2:10M:autoextend
參數要與已有的資料表空間一致,也就是/usr/local/mysql/data/目錄下的檔案size一致。或者直接刪除掉ibdata1 ib_logfile0 ib_logfile1這三個檔案也可。
再啟動,發現還是報這個錯誤。確認是由於my.cnf檔案配置錯誤造成的。
修改my.cnf檔案:
注釋:
#pid-file=/var/run/mysqld/mysqld.pid
#socket=/var/lib/mysql/mysql.sock
這兩行注釋掉。
再啟動,即可成功。
mysql啟動錯誤