添加客服咨詢?cè)斍?/p>
咨詢熱線:15918671994
多用戶
商城系統(tǒng)
訂單
管理系統(tǒng)
訂貨
管理系統(tǒng)
多語言
商城系統(tǒng)
發(fā)表于 2021-06-16 17:31:04 瀏覽:823
1.查看mysql日志:
2019-08-28T16:46:16.909701Z 0 [ERROR] InnoDB: Header page consists of zero bytes in datafile: .\ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2019-08-28T16:46:16.912139Z 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile '.\ibdata1' could not be found in the doublewrite buffer.
2019-08-28T16:46:16.913675Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2019-08-28T16:46:17.218682Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-08-28T16:46:17.220934Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-08-28T16:46:17.223186Z 0 [ERROR] Failed to initialize builtin plugins.
2019-08-28T16:46:17.225009Z 0 [ERROR] Aborting
到mysql目錄下找到my.ini,在其最后加上這兩句:
innodb_flush_method=normal
explicit_defaults_for_timestamp=true
上邊兩句明明這個(gè)文件里邊已經(jīng)有了,但是不加在一起就會(huì)出其他問題。。。
加完之后保存,然后刪除mysql的data目錄下所有文件。
然后再在cmd目錄下定位到mydql的bin目錄下執(zhí)行下邊語句:
mysqld --initialize --user=mysql --console
多用戶商城系統(tǒng)會(huì)創(chuàng)建庫,并且有個(gè)臨時(shí)密碼(這個(gè)臨時(shí)密碼我試過了,貌似不能用的,用這個(gè)登錄客戶端會(huì)提示密碼已經(jīng)過期了,但是登錄mysql的console則可以)
所以我們繼續(xù)登錄mysql console修改一下數(shù)據(jù)庫密碼:
mysql> set password for root@localhost = password('123456');
Query OK, 0 rows affected, 1 warning (0.00 sec)
這時(shí)候我們用123456作為密碼就可以登錄了。
獲取體驗(yàn)賬號(hào) 最新優(yōu)惠及電商資訊