mysql - 使用 mysqlfrm 恢复 .frm 文件的问题

标签 mysql mysql-python recovery file-recovery

希望有人能帮助我,我已经研究了 stackoverflow 上的许多恢复答案。

我错误地从 mysql 复制数据文件夹并将其粘贴到新的 wamp 2.5 mysql/mysl5.6.17/data 文件夹中。

当我点击一个表格时,它给出“表格不存在”。下面显示了正在显示的内容

3688 [Warning] InnoDB: Cannot open table craigmedia/wp_eg_grids from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb troubleshooting.html for how you can resolve the problem.

我有包含 .frm 文件的数据库文件夹。

我一直在尝试使用 mysqlfrm 来恢复表,如以下链接所述:https://dba.stackexchange.com/questions/71596/restoring-mysql-tables-from-ibd-frm-and-mysqllogbin-files

然而,当我将信息放入 mysqlfrm 时,结果如下所示:

1.mysqlfrm --server=root@localhost --port=445 --user=root C:/wamp/bin/mysql/mysql5.6.17/data/craigmedia/wp_eg_grids.frm > wp_eg-grids.txt


Source on localhost: ...connected

ERROR: Cannot read wp_eg_grids.txt. You must have read privileges to the file or path and it must exist. Skipping this argument.
ERROR: Cannot read .frm file from >.frm.

实用程序的执行:'mysqlfrm --server=root@localhost --port=445 --user=root C:/wamp/bin/mysql/mysql5.6.17/data/craigmedia/wp_eg_grids.frm > wp_eg-grids 。文本' 以返回代码“1”结束,但没有错误消息流式传输到标准错误,请查看其执行的输出。

然后我尝试了这个。

2. mysqlfrm --server=root@localhost:3306 c:/wamp/bin/mysql/mysql5.6.17/data/craigmedia/wp_eg_grids.frm --port=3307 --user=root

警告:在命令行界面上使用密码可能不安全。

Source on localhost: ...connected.
Spawning server with --user=root.
Starting the spawned server on port 3307 ...

The console has detected that the utility 'mysqlfrm' ended with an error code. You can get more information about the error by running the console command 'show last error'.

Execution of utility: 'mysqlfrm --server=root@localhost:3306 c:/wamp/bin/mysql/mysql5.6.17/data/craigmedia/wp_eg_grids.frm --port=3307 --user=root' ended with return code '1' and with the following error message:
Traceback <most recent call last>:

File "G:\ade\build\sb_0-16088143-1438774726.78\Python-2.7.6-windows-x86-64bit\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
File "scripts\mysqlfrm.py", line 422, in <module>
File ".\mysql\utilities\command\read_frm.py", line 439, in read_frm_files
File ".\mysql\utilities\command\read_frm.py", line 166, in _spawn_server
File ".\mysql\utilities\command\serverclone.py", line 180, in clone_server
File ".\mysql\utilities\command\tools.py", line 254, in get_mysqld_version

I0Error: [Errno 13] Permission denied: 'version_check'

目前我正在尝试访问一个 .frm 进行测试,即 wp_eg_grids.frm 并将其制作成 wp_eg_grids.txt。谁能注意到我做错了什么或知道如何解决这个问题。

最佳答案

尝试对 mysqlfrm 使用以下语法,它在类似情况下对我有用。

mysqlfrm --server=root:password@localhost:3306 c:/wamp/bin/mysql/mysql5.6.17/data/craigmedia/wp_eg_grids.frm > c:/wamp/bin/mysql/mysql5.6.17/data/craigmedia/wp_eg_grids.txt --diagnostic --port=3307 -vvv --user=root

Turn on diagnostic mode to read .frm files byte-by-byte and generate best-effort CREATE statement.

关于mysql - 使用 mysqlfrm 恢复 .frm 文件的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32656445/

相关文章:

python - 在 pymysql 中使用正确的语法将 python 变量传递给查询

mysql - table1.varchar 上的 table1 join table2 等于 prefix+table2.numeric_id+suffix

python mysqldb导入错误

恢复后 PostgreSQL 9.2 归档最后重放的 WAL

mysql 将两列合并为时间戳

php - Laravel Eloquent 查询反射(reflect)基于另一个表数据的更新数据

Python:无法运行 cx_freeze 创建的 Python 可执行文件(带有文本文件)

Python mysqldb fetchmany 无法正常工作

Windows 卷影复制错误 : 2155348129

linux oneliner 在 18gb 的恢复数据中找到一个恰好包含 23 个字符+换行符(或全部)的文件