Backing Up MySQL Databases + tables
Moderator: General Moderators
Backing Up MySQL Databases + tables
Hi
is there no way/program to backup MySQL Data? i need to re-format my server, and i need to save this info.
Can you help?
Cheers
Volkan
is there no way/program to backup MySQL Data? i need to re-format my server, and i need to save this info.
Can you help?
Cheers
Volkan
how big is your db. if it isn't to big and have phpMyAdmin installed then you can just use that to back up each individual db.
other wise look to the command line and use[mysql_man]mysqldump.html[/mysql_man] to back up your date.
I did a search on mysql.com for backing up database and there where a couple of other options as well.
other wise look to the command line and use[mysql_man]mysqldump.html[/mysql_man] to back up your date.
I did a search on mysql.com for backing up database and there where a couple of other options as well.
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
Yes that is possiblevolkan wrote:ooo, i think i found a way.
Is this possible:
going into the msql install root eg c:\server\mysql\
and making a copy on the folder called 'data' as in this i see folders of my databases.
Don't forget to first stop the MySQL service.
Code: Select all
net stop mysqlI use a batch file to make a backup this way.
It looks something like this:
Code: Select all
net stop mysql
"d:\Console\rar\rar.exe" u -r0 -as D:\Backup\Data_C.rar @D:\Backup\drive_c.txt
"d:\Console\rar\rar.exe" rr5 D:\Backup\Data_C.rar
"d:\Console\rar\rar.exe" u -r0 -as D:\Backup\Data_D.rar @D:\Backup\drive_d.txt
"d:\Console\rar\rar.exe" rr5 D:\Backup\Data_D.rar
net start mysqlbackup mySQL
You can use the Mysql Administrator program that has an automatic and schedule backup project
so you can backup your database whenever you want!
for the easy way you can copy from the /mysql/data/youtdatabase all the files!

for the easy way you can copy from the /mysql/data/youtdatabase all the files!
-
ibizconsultants
- Forum Commoner
- Posts: 35
- Joined: Tue Sep 07, 2004 12:07 pm
Hi Volkan,
You can use the following command on your prompt to backup the entire database along with tables:
mysqldump -u username -p dbname -h hostname > backup.sql
Note: use the "-u hostname" if you do not connect to mysql using localhost.
to restore it back to the server you need to first create the database and assign the necessary rights and the use the following on your prompt
mysql -u username -p dbname -h hostname < backup.sql
Note: again use the "-u hostname" if you do not connect to mysql using localhost.
Hope this helps
Thanks
iBizConsultants
http://www.ibizconsultants.com
You can use the following command on your prompt to backup the entire database along with tables:
mysqldump -u username -p dbname -h hostname > backup.sql
Note: use the "-u hostname" if you do not connect to mysql using localhost.
to restore it back to the server you need to first create the database and assign the necessary rights and the use the following on your prompt
mysql -u username -p dbname -h hostname < backup.sql
Note: again use the "-u hostname" if you do not connect to mysql using localhost.
Hope this helps
Thanks
iBizConsultants
http://www.ibizconsultants.com