Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
desmondlk
- Forum Commoner
- Posts: 27
- Joined: Tue Sep 24, 2002 10:27 pm
- Location: Malaysia
Post
by desmondlk »
i had used the following command to backup MySQL database.
the database name is Test.
>mysqldump --opt Test > DB.sql
is works. But how can i backup the database in my desire location.
i had try the following command but csn't get through.
>mysqldump --opt Test > C:\Documents and Settings\User\My Documents\DB.sql
please help...
-
volka
- DevNet Evangelist
- Posts: 8391
- Joined: Tue May 07, 2002 9:48 am
- Location: Berlin, ger
Post
by volka »
that's probably because of the blanks in your path
Try it in double-quotes
mysqldump --opt Test > "C:\Documents and Settings\User\My Documents\DB.sql"
-
desmondlk
- Forum Commoner
- Posts: 27
- Joined: Tue Sep 24, 2002 10:27 pm
- Location: Malaysia
Post
by desmondlk »
thank volka.
What PHP function that require in order to backup MySQL database by using the above command?
-
Takuma
- Forum Regular
- Posts: 931
- Joined: Sun Aug 04, 2002 10:24 am
- Location: UK
-
Contact:
Post
by Takuma »
No but if you want to do it using PHP that'll be quite complicated...
-
desmondlk
- Forum Commoner
- Posts: 27
- Joined: Tue Sep 24, 2002 10:27 pm
- Location: Malaysia
Post
by desmondlk »
So, got any suggestion that is used to backup database? thank in advance...
-
volka
- DevNet Evangelist
- Posts: 8391
- Joined: Tue May 07, 2002 9:48 am
- Location: Berlin, ger
Post
by volka »