[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] MySQL bug
on 5/30/00 10:05 AM, Fathi Said at fathi@xxxxxx wrote:
> Hello Kris,
>
>> Well before you do anything to the database (and you should probably be
>> doing this on a nightly basis anyway, you should run the following command
> :
>> mysqldump databasename -u username --password=password >
>> /home/sites/home/users/admin/thisdatabasebackup.sql
>> for each database on the site.
>
> Thank you very much. So that is the way I can backup databases. But how
> could I restore them? Thanks.
You can restore them by doing the following:
mysql -u username -p password databasename < databasebackup.sql
The backup just creates a long set of SQL queries that will recreate allt he
tables and rows. The above command essentially pipes these queries to the
mysql client.
You could also use phpMyAdmin (which IIRC you are running):
Run SQL query/queries on database databasename:
or Location of the textfile:
just punch in the location of the text file.
-k