Re: how to backup mySQL database?

2001-03-12 Thread Tõnu Samuel

Keneth wrote:
 
 "When I try to dump sql database it gives me some errors 1.Error 1045
 mysqldump --opt database  backup-accp.sql mysqldump: Got error: 1045:
 Access denied for user: 'accp@localhost' (Using pass word: NO) "
 
 can you help?

Please read the manual and list archive!

 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

  

-- 
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Tonu Samuel [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Tallinn, Estonia
   ___/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: how to backup mySQL database?

2001-03-09 Thread Steve Ruby

Keneth wrote:
 
 "When I try to dump sql database it gives me some errors 1.Error 1045
 mysqldump --opt database  backup-accp.sql mysqldump: Got error: 1045:
 Access denied for user: 'accp@localhost' (Using pass word: NO) "
 
 can you help?
 
 with best regards,
 Keneth

Read the manual, read "mysqldump --help"

you probably need to specify username and password switches.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Antwort: RE: Antwort: RE: how to backup mySQL database?

2001-03-01 Thread alexander . skwar


On 28.02.2001 05:58:33 ?US-ASCII?Q?Fabio_Ottolini?= wrote:

 mysqldump "spits" not only table structures but data also. When you use
 mysql to import data it will first attempt to create the table and then load
 its values. If your table's got AUTO_INCREMENT set it will work fine after
 recreating the database. Anyway... Give it a try! :)

Once more: No, it won't.
Again, do this, and you'll see that it will not work correctly - or rather it
will work correctly, but the recreated table will have different values.
Create a table with one AUTO_INCREMENT column called ID.
Insert one row, like so:
 INSERT INTO Tbl (ID) VALUES (0)
Check all the rows:
 SELECT ID FROM Tbl
You'll see that the row's ID column is != 0.
Do this to set the column to 0:
 UPDATE Tbl SET ID=0 WHERE ID = 1
Check all the rows:
 SELECT ID FROM Tbl
Now the row will have the ID set to 0.
Dump the table, drop the table, replay the dump.
Now you'll have just one row again, but ID will be != 0, because the dump
contained the statement "INSERT INTO Tbl (ID) VALUES (0)" - as I just explained,
this won't work.

Give it a try before you disagree again :-))



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Antwort: Re: Antwort: Re: Antwort: RE: how to backup mySQL database?

2001-03-01 Thread alexander . skwar


On 28.02.2001 19:51:13 Gerald L. Clark wrote:

 In the dump, the autoincrement columns will have their actual values,
 not 0.

Yes,  correct - and if the actual value is 0, it will contain just this.  And
inserting a row with the col set to 0, will change the column value.

TRY IT!



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: how to backup mySQL database?

2001-02-28 Thread Fábio Ottolini

Try using mysqldump.

BR,

Fbio Ottolini

-Original Message-
From: Keneth [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 28, 2003 5:06 AM
To: [EMAIL PROTECTED]
Subject: how to backup mySQL database?


Anyone know how to backup mySQL database?

with best regards,
TOM


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: how to backup mySQL database?

2001-02-28 Thread Keneth


"When I try to dump sql database it gives me some errors 1.Error 1045
mysqldump --opt database  backup-accp.sql mysqldump: Got error: 1045:
Access denied for user: 'accp@localhost' (Using pass word: NO) "

can you help?

with best regards,
Keneth
- Original Message -
From: "Fbio Ottolini" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 01, 2001 4:26 AM
Subject: RE: how to backup mySQL database?


 Try using mysqldump.

 BR,

 Fbio Ottolini

 -Original Message-
 From: Keneth [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 28, 2003 5:06 AM
 To: [EMAIL PROTECTED]
 Subject: how to backup mySQL database?


 Anyone know how to backup mySQL database?

 with best regards,
 TOM


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Antwort: RE: how to backup mySQL database?

2001-02-28 Thread alexander . skwar


On 28.02.2001 21:26:17 ?iso-8859-1?Q?F=E1bio_Ottolini?= wrote:

 Try using mysqldump.

This won't work always!  For instance, I have a table that has a auto_increment
INT column in it.  Storing a row with this column set to 0 (zero), will add this
row just fine.  But now the row will not have this column set to 0, but to the
value it would get when normally auto incrementing it.
How to circumvent this?



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Antwort: Re: how to backup mySQL database?

2001-02-28 Thread alexander . skwar


On 28.04.2003 10:55:50 Keneth wrote:

 "When I try to dump sql database it gives me some errors 1.Error 1045
 mysqldump --opt database  backup-accp.sql mysqldump: Got error: 1045:
 Access denied for user: 'accp@localhost' (Using pass word: NO) "

You did not specify the username and password on the mysqldump command line.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Antwort: RE: how to backup mySQL database?

2001-02-28 Thread Gerald L. Clark

[EMAIL PROTECTED] wrote:
 
 On 28.02.2001 21:26:17 ?iso-8859-1?Q?F=E1bio_Ottolini?= wrote:
 
  Try using mysqldump.
 
 This won't work always!  For instance, I have a table that has a auto_increment
 INT column in it.  Storing a row with this column set to 0 (zero), will add this
 row just fine.  But now the row will not have this column set to 0, but to the
 value it would get when normally auto incrementing it.
 How to circumvent this?
 
But the dump who't have it set to zero, so it will reload with its
proper value.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Antwort: RE: how to backup mySQL database?

2001-02-28 Thread Fabio Ottolini

mysqldump "spits" not only table structures but data also. When you use
mysql to import data it will first attempt to create the table and then load
its values. If your table's got AUTO_INCREMENT set it will work fine after
recreating the database. Anyway... Give it a try! :)

BR,

Fabio Ottolini

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Gerald L. Clark
Sent: Wednesday, February 28, 2001 12:04 PM
To: [EMAIL PROTECTED]
Cc: Fabio Ottolini; [EMAIL PROTECTED]
Subject: Re: Antwort: RE: how to backup mySQL database?


[EMAIL PROTECTED] wrote:

 On 28.02.2001 21:26:17 ?iso-8859-1?Q?F=E1bio_Ottolini?= wrote:

  Try using mysqldump.

 This won't work always!  For instance, I have a table that has a
auto_increment
 INT column in it.  Storing a row with this column set to 0 (zero), will
add this
 row just fine.  But now the row will not have this column set to 0, but to
the
 value it would get when normally auto incrementing it.
 How to circumvent this?

But the dump who't have it set to zero, so it will reload with its
proper value.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Antwort: Re: Antwort: RE: how to backup mySQL database?

2001-02-28 Thread Gerald L. Clark

[EMAIL PROTECTED] wrote:
 
 On 28.02.2001 16:03:57 Gerald L. Clark wrote:
 
  But the dump who't have it set to zero, so it will reload with its
  proper value.
 
 No, in the dump the column will be set to zero, but since "INSERT INTO Tbl
 (AutoCol) VALUES (0)" means that AutoCol should be set to the next available
 value (if AutoCol is auto_incrementing), the row will *NOT* have AutoCol set to
 0, but to something else.


In the dump, the autoincrement columns will have their actual values,
not 0.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: how to backup mySQL database?

2001-02-28 Thread Dan Adams

This is the way i do it: 
- write a script that will run mysqldump on the database of choice and then pipe the 
result though gzip (this is only to reduce the size)
- the script also copies the new backup over the old one where every you may be 
backing it up
- run this script with cron every night or whenever you want to do backups
- write another script which rotates the update logs and install the script under 
crontab also

when you need to restore a backup just recreate the database you need to restore and 
pipe the last database backup through the mysql program. then do the same with the 
most recent update script. this should restore your database to the point at which it 
was when the bad stuff happened.

Here are my scripts:

backupdb:
#!/bin/sh

backupdir=/usr/backup
bindir=/usr/local/bin

rm $backupdir/$1.gz
$bindir/mysqldump $1 | /usr/bin/gzip  $backupdir/$1.gz


rotate-update-logs:
#!/bin/sh
# only keeps 2 logs

base=servername
datadir=/usr/local/var
bindir=/usr/local/bin

cd $datadir
mv $base.002 $base.001
$bindir/mysqladmin flush-logs

These are just basic scripts but they work for me. I hope this helps.
  - Dan

On 2003-04-29 00:06:05, Keneth wrote:
 Anyone know how to backup mySQL database?
 
 with best regards,
 TOM
 
 
 
 

Posted via Project Horizon
http://www.projecthorizon.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: how to backup mySQL database?

2001-02-28 Thread Quentin Bennett

Another tip is to store the backup on a separate physical disk and tape to
the actual database, because if they are on the same device, and that dies,
then there goes your back up too!

Quentin

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 1 March 2001 8:21 a.m.
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: how to backup mySQL database?


This is the way i do it: 
- write a script that will run mysqldump on the database of choice and then
pipe the result though gzip (this is only to reduce the size)
- the script also copies the new backup over the old one where every you may
be backing it up
- run this script with cron every night or whenever you want to do backups
- write another script which rotates the update logs and install the script
under crontab also

when you need to restore a backup just recreate the database you need to
restore and pipe the last database backup through the mysql program. then do
the same with the most recent update script. this should restore your
database to the point at which it was when the bad stuff happened.

Here are my scripts:

backupdb:
#!/bin/sh

backupdir=/usr/backup
bindir=/usr/local/bin

rm $backupdir/$1.gz
$bindir/mysqldump $1 | /usr/bin/gzip  $backupdir/$1.gz


rotate-update-logs:
#!/bin/sh
# only keeps 2 logs

base=servername
datadir=/usr/local/var
bindir=/usr/local/bin

cd $datadir
mv $base.002 $base.001
$bindir/mysqladmin flush-logs

These are just basic scripts but they work for me. I hope this helps.
  - Dan

On 2003-04-29 00:06:05, Keneth wrote:
 Anyone know how to backup mySQL database?
 
 with best regards,
 TOM
 
 
 
 

Posted via Project Horizon
http://www.projecthorizon.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended 
recipient, you are asked to respect that confidentiality and not 
disclose, copy or make use of its contents. If received in error 
you are asked to destroy this email and contact the sender immediately. 
Your assistance is appreciated.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php