PDA

View Full Version : MySQL Migration


nhdonny
07-07-2005, 10:03 AM
I'm trying to import a 5mb (filename.sql) db into my new VPS.

When I use phpMyadmin to upload the sql file it times out everytime. This is logged in as the site owner or as my VPS Admin.

My quotas in cPanel are set to unlimited.

I haven't learned to shell yet or I'd take the entire db folder and copy it up to MySql.

Any ideas or lessons are appreciated as this is my first real post.

Robert
07-07-2005, 12:23 PM
Hi there! Most likely the best way to import it would be through SSH. Upload the file to your server via FTP, and then use:

mysql -u [username] -p[password] [database] < [backup_file]

mysql -u mysqlUSER -pmysqlPASS mysqlDB < /home/USERNAME/david_forumdb.sql

It may look like your SSH hangs up at that point. That is normal depending on the size of the database. :) Just let it do it's thing. You'll get your cursor back when you the import completes.

Hope that helps!

nhdonny
07-07-2005, 12:28 PM
I'll give it a try

Fred
07-07-2005, 07:36 PM
Hi there! Most likely the best way to import it would be through SSH.

This is so right...

And SSH is so better for a database dump than phpmyadmin... specifically for a big db.

nhdonny
07-09-2005, 10:44 PM
I almost give up. I still can't get my data moved over.

I try what robert says and nothing happens.

Besides the SQL dump, I have the entire data/dbdirectory from mysql uploaded as both zip and a directory in the public_html. Isn't there a simple way to copy the directory to the mysql data directory? If I could find the mysql directory I'd dance.

Learning SSH is like learning CPM all over again and I'll get it eventually.

TomK
07-09-2005, 11:24 PM
Please submit a ticket and we can get this done for you, not a problem!