Windows 上无法读取字节码数据库 tar.gz (Maxmind)

发布于 2024-12-18 04:52:09 字数 317 浏览 2 评论 0原文

根据我之前的问题(Maxmind 世界城市数据库问题(MySql)),我没有收到任何解决方案,只是用几条评论结束了我的问题(无论如何,感谢您的评论)。

我以另一种方式重新发布我的问题:如何有人以字节码形式导入 txt 文件中包含的数据库,压缩在 tar.gz 文件中的文件(可能是两次),并且在 Windows 的 MySQL 上导入。

这是文件:http://www.maxmind.com/app/worldcities

提前致谢,

Following my previous question (Maxmind world cities database issue (MySql)), for which I did not receive any solution, just closed my question with couple comments (anyway, thanks for the comments).

I repost my question in an other way : how could somebody import a database contained in txt file under bytecode form, file compressed in a tar.gz file (may be twice), and this on MySQL for Windows.

Here is the file : http://www.maxmind.com/app/worldcities

Thanks in advance,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怀念你的温柔 2024-12-25 04:52:09

这个问题似乎影响了很多人,包括我。目前,MaxMind 论坛正在讨论该问题。您可能会发现它很有帮助 - 希望它能很快得到解决。

[编辑]已经解决了!正如您所说,该文件被压缩了两次。详细信息请参阅链接。

This is a problem which seems to be affecting a number of people, me included. The problem is currently being discusssed at the MaxMind forums. You may find it helpful to look- hopefully it can be resolved soon.

[EDIT] It's been solved! The file WAS compressed twice, as you said. See the link for details.

萌吟 2024-12-25 04:52:09

我在 a_horse help 中找到了解决方案:正如他所说,该文件被两次压缩(tar.gz),但方式错误。

过程如下:gunzip tar.gz 文件。你将会有一个 worldcitiespop.txt。将此文件重命名为 tar.gz。 Gunzip(如果需要则强制)此文件。您将获得一个 worldcitiespop.tar 文件。将此文件重命名为 txt,这就是它!

I found the solution with a_horse help : as he said, the file is twice zipped (tar.gz), but in the wrong way.

So here is the process : gunzip the tar.gz file. You gonna have a worldcitiespop.txt. Rename this file as a tar.gz. Gunzip (force if it's required) this file. You gonna obtain a worldcitiespop.tar file. Rename this file as a txt and here is it!

甜点 2024-12-25 04:52:09

当您有此类格式错误的文件时,首先建议是使用 filefile 查看文件的前几个字节魔法数字 它标识文件的格式,忽略潜在的误导性扩展名。使用此工具,您可以确定文件类型,将扩展名更改为适当的扩展名,然后继续提取,直到获得所需的纯文本。

我希望您能原谅宽泛的答案,特别是在您已经找到特定问题的解决方案之后,但对于该网站的未来访问者来说,他们更有可能遇到“无法打开文件的扩展名错误”而不是您的具体问题。

When you have malformed files of this sort, the first advisable thing is to use a program like file. file looks at the first few bytes of a file for magic numbers which identify the format of the file, ignoring the potentially-misleading extension. Using this tool, you could have determined the filetype, changed the extension to the appropriate one, and continued extracting until you had the plaintext you were after.

I hope you'll pardon the broad answer, especially after you've already found a solution to your specific problem, but for the purposes of future visitors to the site, it is more likely they have the general problem of "unable to open a file which has the wrong extension" than your specific issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文