日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
MySQL啟動(dòng)時(shí)丟失數(shù)據(jù)文件不報(bào)錯(cuò)是什么情況

這篇文章主要講解了“MySQL啟動(dòng)時(shí)丟失數(shù)據(jù)文件不報(bào)錯(cuò)是什么情況”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“MySQL啟動(dòng)時(shí)丟失數(shù)據(jù)文件不報(bào)錯(cuò)是什么情況”吧!

城廂ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書(shū)未來(lái)市場(chǎng)廣闊!成為成都創(chuàng)新互聯(lián)公司的ssl證書(shū)銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:13518219792(備注:SSL證書(shū)合作)期待與您的合作!



下面就是我的過(guò)程:
1、關(guān)閉MySQL數(shù)據(jù)庫(kù)
[root@drbd-01 db1]# service mysqld stop
Shutting down MySQL (Percona Server).......................[確定]...

2、刪除MySQL的一個(gè)數(shù)據(jù)文件
[root@drbd-01 db1]# cd /data/mysql/data/db1
[root@drbd-01 db1]# mv t1.ibd t1.ibd.bak
[root@drbd-01 db1]# mv t1.frm t1.frm.bak
[root@drbd-01 db1]# ls
db.opt  t1.frm.bak  t1.ibd.bak

3、重新啟動(dòng)MySQL
[root@drbd-01 db1]# service mysqld start
Starting MySQL (Percona Server)..............................................................  [確定]

在丟失數(shù)據(jù)文件 t1.ibd的情況下,數(shù)據(jù)庫(kù)居然啟動(dòng)起來(lái)了(這在oracle里面簡(jiǎn)直是不允許的)

4、驗(yàn)證
(root@localhost)[(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| db1                |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.17 sec)

(root@localhost)[(none)]> use db1;
Database changed
(root@localhost)[db1]> show tables;
Empty set (0.00 sec)

發(fā)現(xiàn)t1表果真不存在了。

(root@localhost)[db1]> create table t1 (id int);
ERROR 1813 (HY000): Tablespace for table '`db1`.`t1`' exists. Please DISCARD the tablespace before IMPORT.

又不讓建立t1表,好尷尬。

5、查看錯(cuò)誤日志(還好錯(cuò)誤日志告訴我們數(shù)據(jù)文件曾經(jīng)存在但現(xiàn)在丟了)

[root@drbd-01 db1]# tail -100 /data/mysql/logs/mysql-error.log 
InnoDB: directories yourself, InnoDB does not create them.
2016-01-08 16:43:12 10462 [ERROR] InnoDB: Could not find a valid tablespace file for 'db1/t1'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2016-01-08 16:43:12 10462 [ERROR] InnoDB: Tablespace open failed for '"db1"."t1"', ignored.
2016-01-08 16:43:12 10462 [Note] InnoDB: 128 rollback segment(s) are active.
2016-01-08 16:43:12 10462 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.27-76.0 started; log sequence number 1689915
2016-01-08 16:43:13 10462 [ERROR] InnoDB: Failed to find tablespace for table '"db1"."t1"' in the cache. Attempting to load the tablespace with space id 7.
2016-01-08 16:43:13 7f266daba700  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
2016-01-08 16:43:13 10462 [ERROR] InnoDB: Could not find a valid tablespace file for 'db1/t1'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2016-01-08 16:43:13 10462 [Note] Server hostname (bind-address): '*'; port: 3306
2016-01-08 16:43:13 10462 [Note] IPv6 is available.

6、結(jié)論
在MySQL數(shù)據(jù)庫(kù)啟動(dòng)時(shí),管理員別忘了仔細(xì)觀察你的錯(cuò)誤日志,以便及時(shí)發(fā)現(xiàn)問(wèn)題。

感謝各位的閱讀,以上就是“MySQL啟動(dòng)時(shí)丟失數(shù)據(jù)文件不報(bào)錯(cuò)是什么情況”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)MySQL啟動(dòng)時(shí)丟失數(shù)據(jù)文件不報(bào)錯(cuò)是什么情況這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!


分享題目:MySQL啟動(dòng)時(shí)丟失數(shù)據(jù)文件不報(bào)錯(cuò)是什么情況
本文來(lái)源:http://www.dlmjj.cn/article/gecsgg.html