Splitting MySQL Database?

~bk

I
Political Access
Joined
3 Nov 2003
Messages
3,768
I recently switched hosts for my website. So now I'm trying to upload MySQL database for my blog through phpMyAdmin but I can't as the upload limit is only 2MB. My file is around 5MB. I emailed the hosting company about it and this is what I got:

As of the moment the maximum file that can be uploaded at one time on our database is around 2 MB only. The only workaround that we can suggest on this is to slit the files into smaller pieces so that you can upload it one at a time and then just merge it back once its uploaded.

Now how do I do the italicized part? :p
 

X-Istence

*
Political Access
Joined
5 Dec 2001
Messages
6,498
Ehm, sure, chop the file into little bits, won't work though, since MySQL dumps are sensitive as to where you chop them. If you chop an INSERT in half MySQL WILL complain.

Put the file in a folder on your webhost, then contact your webhost and tell them to run this command:

mysql -u [your MySQL username] -p [database here] < file.sql

Then also give them a password, and they can import the database on the server itself. If they can't do this for you, consider switching to another host.

Bert JW Regeer
 

Shamus MacNoob

OSNN Veteran Addict
Political Access
Joined
8 Jan 2002
Messages
4,199
you can chop and reassemble once it is uploaded no need to insert a half anywhere .
 

LordOfLA

Godlike!
Joined
2 Feb 2004
Messages
7,026
just FTP it to the server and tell phpmyadmin to use a server based file or login via ssh and upload it to mysql that way.

If you need an ssh enabled hosting account drop me a note.
 

X-Istence

*
Political Access
Joined
5 Dec 2001
Messages
6,498
you can chop and reassemble once it is uploaded no need to insert a half anywhere .

phpMyAdmin takes an upload, and immediatly tries to put it into the database, it does not store it intermediately somewhere while you upload the second half.
 

~bk

I
Political Access
Joined
3 Nov 2003
Messages
3,768
Thanks guys. I'll see what I can do. :)
 

Members online

Latest profile posts

Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk wrote on Sazar's profile.
Where are you buddy?

Forum statistics

Threads
62,007
Messages
673,466
Members
5,598
Latest member
Larry Chris