简体   繁体   English

使用sqldump生成的sql文件还原mariadb引发错误代码22

[英]restoring mariadb using sqldump generated sql file throw errorcode 22

I run the following to dump full database C:\\MariaDB\\bin mysqldump.exe -uroot -p --single-transaction --flush-logs --master-data=2 --all-databases > full_db_backup.sql on one computer. 我运行以下命令以将完整数据库C:\\ MariaDB \\ bin mysqldump.exe -uroot -p-单个事务--flush-logs --master-data = 2 --all-databases> full_db_backup.sql转储到一台计算机上。

Then, on another machine, I reinstall a fresh new MariaDB 10.1.22. 然后,在另一台计算机上,我重新安装了新的MariaDB 10.1.22。 And populate this new database instance with the following: C:\\MariaDB\\bin mysql.exe -uroot -p < full_db_backup.sql 并使用以下命令填充此新数据库实例:C:\\ MariaDB \\ bin mysql.exe -uroot -p <full_db_backup.sql

After running for half a hour, I get the following error mysql.exe: Error reading file '' (Errcode: 22 "Invalid argument") 运行半小时后,出现以下错误mysql.exe:读取文件”时出错(错误代码:22“无效参数”)

This error even does not have enough information for me to debug or chase down. 该错误甚至没有足够的信息供我调试或追查。 The sql dump is 90GB and pretty large. sql转储为90GB,非常大。 It is hopeless to grep '' from that file. 从该文件中grep''是绝望的。 I even have no idea how to start to investigate this problem. 我什至不知道如何开始调查这个问题。 By the way, both original database instance and new database instance are MariaDB 10.1.22. 顺便说一下,原始数据库实例和新数据库实例都是MariaDB 10.1.22。

1) I run "chkdsk /F" 2) reboot my computer 3) run "C:\\MariaDB\\bin mysql.exe -uroot -p < full_db_backup.sql" Now, it works. 1)我运行“ chkdsk / F” 2)重新启动计算机3)运行“ C:\\ MariaDB \\ bin mysql.exe -uroot -p <full_db_backup.sql”现在,它可以工作了。 My speculation is that is something related to hardware. 我的推测是与硬件有关。 ErrorCode 22 might not be an MariaDB error code at all. ErrorCode 22可能根本不是MariaDB错误代码。 It is some OS errorcode passed to MariaDB. 这是传递给MariaDB的一些操作系统错误代码。 I tried 2) and 3) a few times before, it does NOT work. 我几次尝试过2)和3),它不起作用。 So "chkdsk /F" is the magic here. 因此,“ chkdsk / F”是这里的魔力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM