MySQL Dump

MySQL Dump

am 10.02.2003 21:39:44 von nickh

You need to select the Database either in your script or via command line.
If you're doing it via the command line, it would be this:

use dbname

where dbname is the name of your database. If you're using a script, drop
this in:

$db = mysql_connect("$host", "$user","$pass");
mysql_select_db("$dbname",$db);

Where $host is the host name, $user is the username, $pass is the password
and $dbname is the database name. Do not modify the $db unless you're
changing them both to another variable like $db_connect.

You would then proceed after this to do your database dump.



Regards,
Nick H.
nickh@supportteam.net



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: MySQL Dump

am 14.05.2007 12:28:00 von Gustav Wiberg

Hi there!

Thanx. Does this mean that I have to this on each database if I want to cre=
ate ba=20

-----Original Message-----
From: Mikael Grön [mailto:php@emgee.se]=20
Sent: Monday, May 14, 2007 11:49 AM
To: 'php windows' (php-windows@lists.php.net)
Subject: Re: [PHP-WIN] MySQL Dump

mysqldump -uusername -ppassword database > output.file

or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.

Remember, no spaces between -u and the username or -p and the password.

Mike


Gustav Wiberg skrev:
> Hi!
> =20
> Trying to figure out mysqldump. How would i type to making a backup of a =
database with specific username and password with mysqldump?
> =20
> I've tryed making a backup-schema through MySQL Administrator but there i=
t says... Wrong password. I've changed the password type to Obscure but it =
doesn't seem to matter.
> =20
> Best regards
> /Gustav Wiberg
>
> =20

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: MySQL Dump

am 14.05.2007 12:30:00 von Gustav Wiberg

Hi there!

Thanx! Does this mean that I can't use option -ALL databases when using use=
rnames and passwords?
(I want to create a backup each night for every database we own with mysqld=
ump)=20

Best regards
/Gustav Wiberg

=20

-----Original Message-----
From: Mikael Grön [mailto:php@emgee.se]=20
Sent: Monday, May 14, 2007 11:49 AM
To: 'php windows' (php-windows@lists.php.net)
Subject: Re: [PHP-WIN] MySQL Dump

mysqldump -uusername -ppassword database > output.file

or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.

Remember, no spaces between -u and the username or -p and the password.

Mike


Gustav Wiberg skrev:
> Hi!
> =20
> Trying to figure out mysqldump. How would i type to making a backup of a =
database with specific username and password with mysqldump?
> =20
> I've tryed making a backup-schema through MySQL Administrator but there i=
t says... Wrong password. I've changed the password type to Obscure but it =
doesn't seem to matter.
> =20
> Best regards
> /Gustav Wiberg
>
> =20

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: MySQL Dump

am 14.05.2007 13:32:06 von php

mysqldump -uusername -p -A > output.file
Enter password: [password]

Done


Gustav Wiberg skrev:
> Hi there!
>
> Thanx! Does this mean that I can't use option -ALL databases when using usernames and passwords?
> (I want to create a backup each night for every database we own with mysqldump)
>
> Best regards
> /Gustav Wiberg
>
>
>
> -----Original Message-----
> From: Mikael Grön [mailto:php@emgee.se]
> Sent: Monday, May 14, 2007 11:49 AM
> To: 'php windows' (php-windows@lists.php.net)
> Subject: Re: [PHP-WIN] MySQL Dump
>
> mysqldump -uusername -ppassword database > output.file
>
> or
> mysqldump -uusername -p database > output.file
> which lets you specify the password cloaked right after you've hit enter.
>
> Remember, no spaces between -u and the username or -p and the password.
>
> Mike
>
>
> Gustav Wiberg skrev:
>
>> Hi!
>>
>> Trying to figure out mysqldump. How would i type to making a backup of a database with specific username and password with mysqldump?
>>
>> I've tryed making a backup-schema through MySQL Administrator but there it says... Wrong password. I've changed the password type to Obscure but it doesn't seem to matter.
>>
>> Best regards
>> /Gustav Wiberg
>>
>>
>>
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: MySQL Dump

am 14.05.2007 13:39:00 von Gustav Wiberg

Hi there!

Username and password for root (for all databases then) you mean?

/Gustav
=20

-----Original Message-----
From: Mikael Grön [mailto:php@emgee.se]=20
Sent: Monday, May 14, 2007 1:32 PM
To: ''php windows' (php-windows@lists.php.net)'
Subject: Re: [PHP-WIN] MySQL Dump

mysqldump -uusername -p -A > output.file
Enter password: [password]

Done


Gustav Wiberg skrev:
> Hi there!
>
> Thanx! Does this mean that I can't use option -ALL databases when using u=
sernames and passwords?
> (I want to create a backup each night for every database we own with mysq=
ldump)=20
>
> Best regards
> /Gustav Wiberg
>
> =20
>
> -----Original Message-----
> From: Mikael Grön [mailto:php@emgee.se]=20
> Sent: Monday, May 14, 2007 11:49 AM
> To: 'php windows' (php-windows@lists.php.net)
> Subject: Re: [PHP-WIN] MySQL Dump
>
> mysqldump -uusername -ppassword database > output.file
>
> or
> mysqldump -uusername -p database > output.file
> which lets you specify the password cloaked right after you've hit enter.
>
> Remember, no spaces between -u and the username or -p and the password.
>
> Mike
>
>
> Gustav Wiberg skrev:
> =20
>> Hi!
>> =20
>> Trying to figure out mysqldump. How would i type to making a backup of a=
database with specific username and password with mysqldump?
>> =20
>> I've tryed making a backup-schema through MySQL Administrator but there =
it says... Wrong password. I've changed the password type to Obscure but it=
doesn't seem to matter.
>> =20
>> Best regards
>> /Gustav Wiberg
>>
>> =20
>> =20
>
> =20

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: MySQL Dump

am 14.05.2007 13:40:37 von php

Oh yeah, of course. :)

Mike


Gustav Wiberg skrev:
> Hi there!
>
> Username and password for root (for all databases then) you mean?
>
> /Gustav
>
>
> -----Original Message-----
> From: Mikael Grön [mailto:php@emgee.se]
> Sent: Monday, May 14, 2007 1:32 PM
> To: ''php windows' (php-windows@lists.php.net)'
> Subject: Re: [PHP-WIN] MySQL Dump
>
> mysqldump -uusername -p -A > output.file
> Enter password: [password]
>
> Done
>
>
> Gustav Wiberg skrev:
>
>> Hi there!
>>
>> Thanx! Does this mean that I can't use option -ALL databases when using usernames and passwords?
>> (I want to create a backup each night for every database we own with mysqldump)
>>
>> Best regards
>> /Gustav Wiberg
>>
>>
>>
>> -----Original Message-----
>> From: Mikael Grön [mailto:php@emgee.se]
>> Sent: Monday, May 14, 2007 11:49 AM
>> To: 'php windows' (php-windows@lists.php.net)
>> Subject: Re: [PHP-WIN] MySQL Dump
>>
>> mysqldump -uusername -ppassword database > output.file
>>
>> or
>> mysqldump -uusername -p database > output.file
>> which lets you specify the password cloaked right after you've hit enter.
>>
>> Remember, no spaces between -u and the username or -p and the password.
>>
>> Mike
>>
>>
>> Gustav Wiberg skrev:
>>
>>
>>> Hi!
>>>
>>> Trying to figure out mysqldump. How would i type to making a backup of a database with specific username and password with mysqldump?
>>>
>>> I've tryed making a backup-schema through MySQL Administrator but there it says... Wrong password. I've changed the password type to Obscure but it doesn't seem to matter.
>>>
>>> Best regards
>>> /Gustav Wiberg
>>>
>>>
>>>
>>>
>>
>>
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: MySQL Dump

am 14.05.2007 14:00:00 von Gustav Wiberg

Hi!

Ok... Thanx!

Best regards
/Gustav Wiberg
=20

-----Original Message-----
From: Mikael Grön [mailto:php@emgee.se]=20
Sent: Monday, May 14, 2007 1:41 PM
To: ''php windows' (php-windows@lists.php.net)'
Subject: Re: [PHP-WIN] MySQL Dump

Oh yeah, of course. :)

Mike


Gustav Wiberg skrev:
> Hi there!
>
> Username and password for root (for all databases then) you mean?
>
> /Gustav
> =20
>
> -----Original Message-----
> From: Mikael Grön [mailto:php@emgee.se]=20
> Sent: Monday, May 14, 2007 1:32 PM
> To: ''php windows' (php-windows@lists.php.net)'
> Subject: Re: [PHP-WIN] MySQL Dump
>
> mysqldump -uusername -p -A > output.file
> Enter password: [password]
>
> Done
>
>
> Gustav Wiberg skrev:
> =20
>> Hi there!
>>
>> Thanx! Does this mean that I can't use option -ALL databases when using =
usernames and passwords?
>> (I want to create a backup each night for every database we own with mys=
qldump)=20
>>
>> Best regards
>> /Gustav Wiberg
>>
>> =20
>>
>> -----Original Message-----
>> From: Mikael Grön [mailto:php@emgee.se]=20
>> Sent: Monday, May 14, 2007 11:49 AM
>> To: 'php windows' (php-windows@lists.php.net)
>> Subject: Re: [PHP-WIN] MySQL Dump
>>
>> mysqldump -uusername -ppassword database > output.file
>>
>> or
>> mysqldump -uusername -p database > output.file
>> which lets you specify the password cloaked right after you've hit enter=
..
>>
>> Remember, no spaces between -u and the username or -p and the password.
>>
>> Mike
>>
>>
>> Gustav Wiberg skrev:
>> =20
>> =20
>>> Hi!
>>> =20
>>> Trying to figure out mysqldump. How would i type to making a backup of =
a database with specific username and password with mysqldump?
>>> =20
>>> I've tryed making a backup-schema through MySQL Administrator but there=
it says... Wrong password. I've changed the password type to Obscure but i=
t doesn't seem to matter.
>>> =20
>>> Best regards
>>> /Gustav Wiberg
>>>
>>> =20
>>> =20
>>> =20
>> =20
>> =20
>
> =20

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php