mysql啟動錯誤

來源:互聯網
上載者:User

標籤: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啟動錯誤

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.