Importing Large Database tables with Putty




In the past, at other hosts, I have used bigdump to parse large files into batches for the mysql database. For whatever reason this isn’t allowed here since it throws an error and I see utterly no mention of it at wiki or the forums.

I found wiki entries, as well as forum entries on importing large databases. I downloaded Putty and worked from the instructions at DH’s wiki, Migrate MySQL

However, putty tells me that the backup table i FTP’d to the server doesn’t exist.

Here’s how I write the commands:

mysql -uusername -ppassword databasename < db_backeduptableonmylocaldrive.sql

Putty tells me my file, db_backeduptableonmylocaldrive.sql, doesn’t exist on the server.

Is there any other files out there which might give me a couple of klewx4s upside the head?



Other files I consulted at wiki:



Have you tried including the full path to the .sql file in the command line? Something like:

mysql -uusername -ppassword databasename < /home/user/db_backeduptableonmylocaldrive.sql
(assuming you ftp’ed the .sql file to the “root” of your user space, not your “web accessible” directory).



Well you need to find your file… ls will help
ls -la
will show you if your file is where you think…
maybe is on a subdirectory and need to move the file with mv or make your
mysql … < directory/db_backeduptableonmylocaldrive.sql

Anyway I recomend winscp [] for upload files instead of ftp :smiley:

Rethinking the thing, maybe find will serve you more!

find ./ -name “*.sql”

on my case returns

you can do mysql… < ./DB/portal.sql



Good post! Much “mo’ better” than mine, because he does need to find the file first, eh?

Thanks for pointing him to where I should have! :wink:




I thank you both. True, while I thought I’d placed the file in root, it seemed to have poof vanished. I moved it there, ran ls -la and voila! there is was.

i ran the commands again, but I did so without home/user/ as you suggested rlparker.

Right now, there’s no error message, just the green block at command prompt. I’m not sure what that means, though. Um, well, garsh. I looked at MySQL and the files have been imported. yes!

Alas, this seems to have broken the blog because, while it’s linking to the style sheet properly, there is no stylesheet via port 80. Can see it there with FTP, it just doesn’t come up in a browser. Odd.

Could the fact that I only uploaded comments and not posts yet whack the front end of the blog like this?


Well, I’ll finish uploading posts and see what happens. TG for default themes, eh?

Thanks much for the help.


Thanks for the tip about WinScp btw.