如何通过 phpmyadmin 导入非常大的查询?

发布于 2024-07-12 11:53:23 字数 109 浏览 7 评论 0原文

如果我的主机不允许我将文件直接上传到我的 mysql 文件夹 我只能通过 phpmyadmin 这样做吗? 除了其本机导入功能之外,是否还有其他选择,以便我的连接在上传大约 8mb 的查询时不会超时?

if my host does not allow me to upload a file directly to my mysql folder
and i can only do so throught phpmyadmin? are there any alternatives aside from its native import feature so that my connection would not time out while uploading a query that's around 8mb?

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

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

发布评论

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

评论(6

你的他你的她 2024-07-19 11:53:23

您可以 gzip 或 bzip 文件,phpMyAdmin 将解压缩并运行脚本。

否则我过去必须做的就是将 SQL 分成多个文件并单独加载每个文件。 您只需在文本编辑器中打开 SQL 文件,向下滚动到大约一半,找到语句的开头并将其后的所有内容移到另一个文件中即可完成此操作。

you can gzip or bzip the file and phpMyAdmin will decompress and run the script.

otherwise what I've had to do in the past is split my SQL into a number of files and load each one individually. You can do this simply by opening the SQL file in a text editor, scroll to about half way down, find the start of a statement and move everything after that into another file.

灼疼热情 2024-07-19 11:53:23

不要将 phpmyadmin 用于任何重要的事情。 绝对不要用它来创建备份或进行恢复。 这是一袋垃圾。

登录到 shell 并使用 mysql 命令行客户端以标准方式恢复数据库。 如果你做不到,请找一个更好的提供商。

Shell 访问对于使用 mysql 数据库是必需的。

不要指望使用 phpmyadmin 所做的任何事情不会破坏您的所有数据。

Don't use phpmyadmin for anything critical. Definitely don't use it to create backups or do restoration. It's a bag of rubbish.

Log on to your shell and use the mysql command line client to restore the database in the standard way. If you can't do that, get a better provider.

Shell access is necessary to work with mysql databases.

Don't expect anything done with phpmyadmin NOT to destroy all your data.

话少情深 2024-07-19 11:53:23

BigDump?

交错导入大型和超大型 MySQL 转储(如 phpMyAdmin 2.x 转储),甚至可以通过具有严格运行时间限制和安全模式的 Web 服务器进行导入。 该脚本仅执行巨大转储的一小部分并自行重新启动。 下一个会话从上一个会话停止的地方开始。

您可以使用 FTP 客户端上传转储(这将允许您恢复传输),并在本地加载它。

BigDump?

Staggered import of large and very large MySQL Dumps (like phpMyAdmin 2.x Dumps) even through the web servers with hard runtime limit and those in safe mode. The script executes only a small part of the huge dump and restarts itself. The next session starts where the last was stopped.

You could upload the dump with an FTP client (which will allow you to resume the transfer), and load it locally.

眼泪都笑了 2024-07-19 11:53:23

我肯定会说BigDump。 我在使用 8.3 GB sql 文件时遇到了这个问题。 阅读这篇文章以获取更多信息。 如何将 Big SQL 文件上传到 MySQL< /a> 还可以访问脚本主页下载它。

I would definitely say BigDump. i had this exact problem with 8.3 GB sql file. read this article for more info. How To Upload a Big SQL File To MySQL also visit the script home page to download it.

夏日落 2024-07-19 11:53:23

请在此处查看我的答案:https://stackoverflow.com/a/33728744/74585

如果在导入操作期间取消选中“部分”导入-> 允许中断导入...然后 phpMyAdmin 似乎将整个事情发送到 mysql,处理速度很慢。 不幸的是,phpMyAdmin(至少在我的共享主机上)将不再响应请求,但使用不同 IP 地址上的浏览器可以工作,让您监控查询的进度。

See my answer here: https://stackoverflow.com/a/33728744/74585

If during an import operation you untick Partial import -> Allow the interruption of an import... then phpMyAdmin seems to send the entire thing to mysql which is processed slowly. Unfortunately phpMyAdmin (at least on my shared host) will no longer respond to requests, but using a browser on a different IP address works and let's you monitor the query's progress.

听风念你 2024-07-19 11:53:23

我说 - 使用 Sypex Dumper

I say - use Sypex Dumper.

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