phpMyAdmin just... giving up

software development

#1

I have a database with about four million records in it, and I’m trying to export it… however, when I try to export it, I only get about the first 1,750,000 for some reason.

Any ideas?


#2

How big is the database file? There is a limit of 7MB or thereabouts so you may have to ftp the database file to your account and use mysql from the command line to import it.
Having created the database file itself via the ControlPanel of course.


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!


#3

I think you may have misread: I’m trying to export an already existing database. :slight_smile:


#4

Ah, flip my instructions around :slight_smile: . Use command line MySQL to export to a file, gzip/zip it up and ftp it down (upload to PC)

Or more precisely use mysqldump

For a database called example use:-
mysqldump -uusername -ppassword -hhostname example > example.sql


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!


#5

Aye, that sounds like a good plan. Unfortunately, I don’t have a shell on the source database, and I can’t run PHP scripts other than the adminsitrative stuff: I blasted the bandwidth on my old host, they weren’t too happy about it. That’s why I’m at DH. :slight_smile:


#6

Matt,

Have you thought about just dumping smaller subsets of the data, say 5-6 mb at at time (limiting query by date, record numer, or other criteria), and then either recombining the .sql dumps on the DH side before importing to the new database, or just doing multiple imports? Just a thought.

–rlparker


#7

Plan B
What about exporting table by table from your database? Or are your records all in one big table?
Did you try dumping as a CSV file? Although I think the PHP limits will still apply.

Can you create short PHP scripts to run on your database and just select so many records each time to an export file. Then when your have four or five exported data files representing your big database you can import them all back in a file at a time.

Ah you cannot run PHP scripts!

Plan C
Cut and Paste using Browse?

Plan D
Cannot you ask the admins at the host to run the command line dump for your database and plonk it somewhere for you. Perhaps if you were really nice and apologetic to them etc.

Is it a cPanel host?


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!


#8

I eventually exported it in small sections of 15 megabytes, and reconsituted it on the DH server. (Using the gunzip + mysql through system() method I mentioned on the other thread)

Thanks for all the advice. :slight_smile:


#9

I never use phpMyAdmin - try SQLYog (www.webyog.com) they have a trial fully featured version (just a nag screen) I really is fab software and I upload/download 100mb databases with it , without any problem - the full version allows you to even do SSH/HTTP Tunneling, again I cannot stress enough how much time this software has saved me, its excellent.

Miss Pixie
aka Alison