如何在 MAC OSX 中拆分 sql? [英] How to split sql in MAC OSX?

查看:18
本文介绍了如何在 MAC OSX 中拆分 sql?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mac 上有没有可以拆分 sql 文件甚至脚本的应用程序?我有一个大文件,我必须将其上传到不支持超过 8 MB 的文件的主机.

Is there any app for mac to split sql files or even script? I have a large files which i have to upload it to hosting that doesn't support files over 8 MB.

*我没有 SSH 访问权限

*I don't have SSH access

推荐答案

你可以使用这个:http://www.ozerov.de/bigdump/

使用该命令拆分sql文件

Use this command to split the sql file

split -l 5000 ./path/to/mysqldump.sql ./mysqldump/dbpart-

split 命令获取一个文件并将其拆分为多个文件.-l 5000 部分告诉它每五千行拆分文件.下一位是文件的路径,下一部分是要将输出保存到的路径.文件将保存为您指定的任何文件名(例如dbpart-"),并附加一个字母组合.

The split command takes a file and breaks it into multiple files. The -l 5000 part tells it to split the file every five thousand lines. The next bit is the path to your file, and the next part is the path you want to save the output to. Files will be saved as whatever filename you specify (e.g. "dbpart-") with an alphabetical letter combination appended.

现在您应该能够通过 phpMyAdmin 一次导入一个文件而不会出现问题.

Now you should be able to import your files one at a time through phpMyAdmin without issue.

更多信息 http://www.webmaster-source.com/2011/09/26/how-to-import-a-very-large-sql-dump-with-phpmyadmin/

这篇关于如何在 MAC OSX 中拆分 sql?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆