PDA

View Full Version : All right, here's one...how do I make MySQL dumps that WORK using phpMyAdmin?


leah r
Mon 3rd Jul '00, 5:33pm
I'm currently straddling two servers, and want to make a dump of both the structure and contents of my current database to then recreate it on my new server. Altogether, the DB weighs in at about 4MB, a fairly modest number. The problem is, using phpMyAdmin, my data keeps getting horribly corrupted. Posts get jumbled together and pieces of them are arbitrarily missing. In addition to this, all instances of the ' character are escaped (i.e., \'), which you'd think would be no problem when trying to recreate the database. Not so. phpMyAdmin refuses to recognize escaped apostrophes in MySQL dumps, and stops with an error message.

I really don't want to have to wipe out the almost 5000 posts I've accrued in the happy month I've been using vBulletin. Is there some arcane dump option in phpMyAdmin that I should've toggled to make everything magically work? Is the problem that I'm dumping all the structure/data to a single file, when I should be doing it piecemeal, table-by-table? Am I most likely going to lose my database? (cry)

I'm virtually hosted, so messing with system files is not an option. Any advice whatsoever would be sincerely appreciated.

Edit: I can't believe I haven't thought of this until now...could the corruption problem be that I'm trying to dump the database while the board is still active? *looks sheepish*

Thanks for your time,
Leah

[Edited by leah r on 07-03-2000 at 05:35 PM]

Martin
Mon 3rd Jul '00, 5:40pm
I would really recmmend shutting down the board to do this and also using telnet vs phpmyadmin for dumps.

phpmyadmin takes forever to to a send when you dump, and since the board is active the tables are updating.

if you use telnet and do a table dump, it takes a couple of seconds, tops. I dumped my thread table (24mb) in 1 second using the command line.

leah r
Tue 4th Jul '00, 2:08am
Hmmm...thanks for the advice.

What about those escaped apostrophes? Do they pose trouble if I'm trying to recreate a database from a dump from the command line?

Shaman
Tue 4th Jul '00, 11:00am
On the command line:

mysqldump -p dbase_to_dump {table_optional} dbase_to_dump.txt