Backing up the database
Can anyone tell me how I can easily backup the database before I make changes.
Thanks |
Go to the mysql\bin directory from a command prompt window.
Type mysqldump <put your database name here> > somefilenameyoulike.SQL Example. If my database was named eq and the file I wanted it put in was myeqdatabase.sql - I would type: mysqldump eq > myeqdatabase.sql (note:check the file and make sure the contents are there and not some error text). To restore it, you would go into a mysql prompt. Drop your existing database with: drop database <yourdatabasename>; Create the database again: create database <yourdatabasename>; and then source the database with your file... use <yourdatabasename>; source <path to somenameyoulike.sql>somenameyoulike.sql Note, you can always restore it to a newly created database and change your db.ini file to point to the newly created database allowing you to experiment with multiple databases. For more help, check the mysql documentation on these commands. - foobar |
Thanks for that.
I'll give it a go over the wekend. |
If i was to ammend the database in any way would i need to remove the old one first ?
|
I would remove any filename you are about to export to before you export to it.
|
All times are GMT -4. The time now is 06:26 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.