I am quite new to mySQL.
And I have a simple question.
How might I backup my current database? or how might I restore it?
Thanks.
| SitePoint Sponsor |
I am quite new to mySQL.
And I have a simple question.
How might I backup my current database? or how might I restore it?
Thanks.
Start here:
http://www.webmasterbase.com/article...id=228&pid=876
Also, consider using phpMyAdmin to do this.
Hi klisis!
You can use mysqldump that is a utility program that comes with MySQL (in all plataforms: *nix, win, ...)...
To backup a database just do:
mysqldump db >> backup_file.sql
where "db" is the database name that you whant to backup, and "backup_file.sql" is the file where you whant to keep your backup copy of your database.
This will result in a text file with SQL commands to use with MySQL. To restore the database (if a server crash happenshope not) do this:
mysql db << backup_file.sql
If you are not root, you may be prompted for the database password, just type it and you're ready to go...
Good luck
<Edited by vsantola on 02-04-2001 at 11:00 AM>
Valter Santos
rooco is my creature (a mix of a bear with a kanguroo)... he is trained in perl, PHP and is getting a java certification right now
Thanks to Vsantola as well.
Bookmarks