php 在 PHPMyAdmin 中检索已删除的数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5605992/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Retrieve a deleted database in PHPMyAdmin
提问by einstein
I accidently deleted the whole database when I should just delete one table in PHPMyAdmin. Is there a way of retrieving the database?
当我应该删除 PHPMyAdmin 中的一个表时,我不小心删除了整个数据库。有没有办法检索数据库?
采纳答案by cHao
There are two ways:
有两种方式:
- Have a working backup of the system, and restore the files from it.
- An undelete tool might help, if you deleted the db veryrecently (and ideally, if you unplugged the computer right afterward).
- 有一个系统的工作备份,并从中恢复文件。
- 一个反删除工具可以帮助,如果你删除了数据库非常最近(理想情况下,如果您拔掉计算机右后)。
As for doing it with MySQL, though...on all systems i'm aware of, no. MySQL tables are files in the server's data directory, and dropping a table deletes those files. Once they're gone, they're gone, and only the methods above can get them back. A database is a directory of those files, and dropping it deletes the whole directory.
至于用 MySQL 做这件事,不过……在我知道的所有系统上,不。MySQL 表是服务器数据目录中的文件,删除表会删除这些文件。一旦他们走了,他们就走了,只有上面的方法才能把他们找回来。数据库是这些文件的目录,删除它会删除整个目录。
回答by Dinesh Sahoo
Same thing happened with me, found a easy solution. First make a command line access to the database using the mysql.exe
file present in xampp/php/bin
folder. Delete the phpmyadmin
database. Then, just import the create_tables.sql
file to the phpmyadmin database
. This solved my problem.
同样的事情发生在我身上,找到了一个简单的解决方案。首先使用mysql.exe
文件xampp/php/bin
夹中的文件对数据库进行命令行访问。删除phpmyadmin
数据库。然后,只需将create_tables.sql
文件导入到phpmyadmin database
. 这解决了我的问题。
Let me know if you face any problem using this.
如果您在使用它时遇到任何问题,请告诉我。
thanks.
谢谢。
回答by user3297988
Same thing here :-(
I closed xampp (V3.2.1) found the xampp\mysql\ folder, right-clicked and selected Restore previous version, select recent restore. When this finished I opened xampp and the missing database was back with the information dated as per the restore date. Not ideal but better than no database :-)
同样的事情:-(
我关闭了xampp(V3.2.1)找到了xampp\mysql\文件夹,右键单击并选择恢复以前的版本,选择最近的恢复。完成后我打开xampp,丢失的数据库又回来了根据恢复日期注明日期。不理想但总比没有数据库好:-)
回答by Lenin Raj Rajasekaran
You can retrieve a accidentally deleted database via a file restoration software. Check this free software
您可以通过文件恢复软件找回意外删除的数据库。检查这个免费软件
http://www.majorgeeks.com/Restoration_d4474.html
http://www.majorgeeks.com/Restoration_d4474.html
More information here - http://emaillenin.blogspot.com/2010/11/recover-accidentally-deleted-mysql.html
更多信息在这里 - http://emaillenin.blogspot.com/2010/11/recover-accidentally-deleted-mysql.html