MySQL DB Splitter....
- Krank
- Member
- Posts: 90
- Joined: 28 Sep 2006, 21:25
- Location: Somewhere
MySQL DB Splitter....
Guys I need your help with something, I just moved my forum, and I need an application to split my database to parts (2 MBs).

phpBB3 Je t'adore: subSilver2 Based styles fan
proSilver, good, but too .... I don't know just too...

- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor
Re: MySQL DB Splitter....
I just spent half an hour on this...
http://phpbbmodders.net/pastebin.php?mode=view&s=21&highlight=1
This line:
is because the sql file is pretty large and will require a lot of memory. If you get a memory limit, try putting it up to 100M and close some programs. Maybe run it on a real server if your own comp is too weak.
The function call:
has "pow(1024, 2) * 2" as third argument, which you could also write as "1024 * 1024 * 2". 1024 * 1024 bytes is a megabyte, so in my example it will split the files into 2 megabyte files.
Enjoy!
http://phpbbmodders.net/pastebin.php?mode=view&s=21&highlight=1
This line:
Code: Select all
@ini_set('memory_limit', '50M');
is because the sql file is pretty large and will require a lot of memory. If you get a memory limit, try putting it up to 100M and close some programs. Maybe run it on a real server if your own comp is too weak.
The function call:
Code: Select all
split_sql_file('backup.sql', './sql/', pow(1024, 2) * 2);
has "pow(1024, 2) * 2" as third argument, which you could also write as "1024 * 1024 * 2". 1024 * 1024 bytes is a megabyte, so in my example it will split the files into 2 megabyte files.
Enjoy!
- Krank
- Member
- Posts: 90
- Joined: 28 Sep 2006, 21:25
- Location: Somewhere
Re: MySQL DB Splitter....
ohhhhhhh thanks man, thanks a lot, trying it now 


phpBB3 Je t'adore: subSilver2 Based styles fan
proSilver, good, but too .... I don't know just too...

- MarkTheDaemon
- New member
- Posts: 28
- Joined: 23 Jun 2006, 15:41
- Location: United Kingdom
Re: MySQL DB Splitter....
If you are looking to restore the database, [url=http://www.ozerov.de/bigdump.php]bigdump[/url] should work pretty well as well.
Mark
Mark

Never, ever, argue with an idiot. They'll drag you down to their level and beat you with experience

Return to “General Discussion”
Who is online
Users browsing this forum: CommonCrawl [Bot] and 5 guests