SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Dump a database
-
Feb 24, 2001, 18:20 #1
- Join Date
- Nov 2000
- Location
- Hong Kong
- Posts
- 1,508
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
everywhere I've seen how to backup a database, but how do you restore one.
PhpMyADmin is refusing to restore it and was wondering if there was another way?
thanx
Peter
-
Feb 24, 2001, 18:26 #2
- Join Date
- May 2000
- Location
- Canada
- Posts
- 533
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
phpMyAdmin is weird sometimes
here's the trick.. open up the SQL dump you had from phpMyAdmin, copy it into the clipboard, and then paste it in the query window for the specific database... do all this INSTEAD of uploading the file via phpMyAdmin .. and that way it should dump it more efficiently
your second option is dumping it via shell
mysql -u USERNAME -p DBNAME < file.sqlcogito, ergo sum
-
Feb 24, 2001, 18:30 #3
- Join Date
- Nov 2000
- Location
- Hong Kong
- Posts
- 1,508
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My PC crashes sometimes when i try to copy the file: it is 495 pages or 800,000 characterss...AHHH.....
I'm trying to do the shell thing except i found it doesn't work. Shell i mean. I don;'t have access to shell....
I'll try copying again
Peter
-
Feb 25, 2001, 22:26 #4
- Join Date
- Sep 2000
- Posts
- 94
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Pete-
To restore a database all you need to do is the following command.
mysql -uusername -ppassword database < backedupfile.sql
HTH
StevenHave you ever been ripped off, lied to or cheated? If so, check out
Baddealings.com
-
Feb 25, 2001, 23:53 #5
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
That's assuming you either have telnet/SSH access to your server, or your MySQL server allows you to connect directly from your own computer (in which case you'd install the 'mysql' program on your own computer and run it with the --host parameter).
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Feb 26, 2001, 02:10 #6
- Join Date
- Sep 2000
- Posts
- 94
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, kyank is right. However, I know that pete has SSH/telnet access because we have the same host.
Have you ever been ripped off, lied to or cheated? If so, check out
Baddealings.com
Bookmarks