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

查看:227
本文介绍了如何在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/

You can use this : 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天全站免登陆