Re: Questions about Mysqldump

2011-09-15 Thread Chris Tate-Davies

Adarsh,

1)

When restoring a mysqldump you have the option of which database to restore.

mysql database1  backup.sql

2)

You might be able to use the --ignore-table command. I'm not sure if 
this would work


mysqldump --all-databases -q  --single-transaction 
--ignore-table=databasetoignore.* | gzip  
/media/disk-1/Server11_MysqlBackup_15September2011/mysql_15sep2011backup.sql.gz


3)

The docs are here for mysqldump, might be worth a read:

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html


HTH, Chris



On 15/09/11 06:29, Adarsh Sharma wrote:

Dear all,

Today i backup my all databases (25) by using the below command :-

mysqldump --all-databases -q  --single-transaction | gzip  
/media/disk-1/Server11_MysqlBackup_15September2011/mysql_15sep2011backup.sql.gz


Now I have some doubts or problems that I need to handle in future :

1. Is there any option in restore command ( I use mysql  backup.sql 
)  to store only specific 1 or 2 databases out of this big backup file.
2. While taking mysqldump of all databases , is there any way to leave 
specific databases , I know there is --databases option , but we have 
to name other 23 databases then.
3. What are the settings that are need to changed in my.cnf to make 
backup  restore faster.



Thanks




--

*Chris Tate-Davies*

*Software Development*
Inflight Productions Ltd
Telephone: 01295 269 680
15 Stukeley Street | London | WC2B 5LT
*Email:*chris.tatedav...@inflightproductions.com 
mailto:chris.tatedav...@inflightproductions.com

*Web:*www.inflightproductions.com http://www.inflightproductions.com/





-


Registered Office: 15 Stukeley Street, London WC2B 5LT, England.
Registered in England number 1421223

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited. Please note that the information 
provided in this e-mail is in any case not legally binding; all committing 
statements require legally binding signatures.


http://www.inflightproductions.com



Re: Questions about Mysqldump

2011-09-15 Thread Carsten Pedersen

On 15-09-2011 10:31, Chris Tate-Davies wrote:

Adarsh,

1)

When restoring a mysqldump you have the option of which database to
restore.

mysql database1  backup.sql


Admittedly, it's been a few years since I last used mysqldump, but I 
suspect that it will contain USE commands - as such, it will restore to 
whatever database data was dumped from.


You'll want to have --one-database on the cmd line too.



2)

You might be able to use the --ignore-table command. I'm not sure if
this would work

mysqldump --all-databases -q --single-transaction
--ignore-table=databasetoignore.* | gzip 
/media/disk-1/Server11_MysqlBackup_15September2011/mysql_15sep2011backup.sql.gz


or create a short script that asks mysql for all databases, greps away 
those you don't want to dump, and runs mysqldump on the rest.


/ Carsten



3)

The docs are here for mysqldump, might be worth a read:

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html


HTH, Chris



On 15/09/11 06:29, Adarsh Sharma wrote:

Dear all,

Today i backup my all databases (25) by using the below command :-

mysqldump --all-databases -q --single-transaction | gzip 
/media/disk-1/Server11_MysqlBackup_15September2011/mysql_15sep2011backup.sql.gz


Now I have some doubts or problems that I need to handle in future :

1. Is there any option in restore command ( I use mysql  backup.sql )
to store only specific 1 or 2 databases out of this big backup file.
2. While taking mysqldump of all databases , is there any way to leave
specific databases , I know there is --databases option , but we have
to name other 23 databases then.
3. What are the settings that are need to changed in my.cnf to make
backup  restore faster.


Thanks






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Questions about Mysqldump

2011-09-15 Thread Ananda Kumar
or u can use for loop, have only the database to be exported and use that
variable in --database and do mysqldump of each database.

On Thu, Sep 15, 2011 at 6:27 PM, Carsten Pedersen cars...@bitbybit.dkwrote:

 On 15-09-2011 10:31, Chris Tate-Davies wrote:

 Adarsh,

 1)

 When restoring a mysqldump you have the option of which database to
 restore.

 mysql database1  backup.sql


 Admittedly, it's been a few years since I last used mysqldump, but I
 suspect that it will contain USE commands - as such, it will restore to
 whatever database data was dumped from.

 You'll want to have --one-database on the cmd line too.



 2)

 You might be able to use the --ignore-table command. I'm not sure if
 this would work

 mysqldump --all-databases -q --single-transaction
 --ignore-table=**databasetoignore.* | gzip 
 /media/disk-1/Server11_**MysqlBackup_15September2011/**
 mysql_15sep2011backup.sql.gz


 or create a short script that asks mysql for all databases, greps away
 those you don't want to dump, and runs mysqldump on the rest.

 / Carsten



 3)

 The docs are here for mysqldump, might be worth a read:

 http://dev.mysql.com/doc/**refman/5.1/en/mysqldump.htmlhttp://dev.mysql.com/doc/refman/5.1/en/mysqldump.html


 HTH, Chris



 On 15/09/11 06:29, Adarsh Sharma wrote:

 Dear all,

 Today i backup my all databases (25) by using the below command :-

 mysqldump --all-databases -q --single-transaction | gzip 
 /media/disk-1/Server11_**MysqlBackup_15September2011/**
 mysql_15sep2011backup.sql.gz


 Now I have some doubts or problems that I need to handle in future :

 1. Is there any option in restore command ( I use mysql  backup.sql )
 to store only specific 1 or 2 databases out of this big backup file.
 2. While taking mysqldump of all databases , is there any way to leave
 specific databases , I know there is --databases option , but we have
 to name other 23 databases then.
 3. What are the settings that are need to changed in my.cnf to make
 backup  restore faster.


 Thanks




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?**unsub=anan...@gmail.comhttp://lists.mysql.com/mysql?unsub=anan...@gmail.com




Questions about Mysqldump

2011-09-14 Thread Adarsh Sharma

Dear all,

Today i backup my all databases (25) by using the below command :-

mysqldump --all-databases -q  --single-transaction | gzip  
/media/disk-1/Server11_MysqlBackup_15September2011/mysql_15sep2011backup.sql.gz


Now I have some doubts or problems that I need to handle in future :

1. Is there any option in restore command ( I use mysql  backup.sql )  
to store only specific 1 or 2 databases out of this big backup file.
2. While taking mysqldump of all databases , is there any way to leave 
specific databases , I know there is --databases option , but we have to 
name other 23 databases then.
3. What are the settings that are need to changed in my.cnf to make 
backup  restore faster.



Thanks


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: About mysqldump

2006-06-22 Thread Jørn Dahl-Stamnes
On Thursday 22 June 2006 04:00, Daniel da Veiga wrote:
 On 6/21/06, Jørn Dahl-Stamnes [EMAIL PROTECTED] wrote:
  On Wednesday 21 June 2006 17:17, Barry wrote:
   Jørn Dahl-Stamnes schrieb:
Is it possible to get mysqldump to include rights that has been
GRANTED to a database or to tables in the database that is being
dumped?
  
   Dump the Grant tables?
 
  I have though of it. Currently I am dumping the mysql database, but there
  is a lot of tables that I probably don't need.
 
  Based on a dump of the mysql database, I guess that the following tables
  are the one I need to dump:
 
  mysql.db
  mysql.table_privs
  mysql.user
 
  Comments?

 Isn't the hosts table needed too?!

Maybe, but it is empty on my sql-server.

BTW, I'm using an older version of MySQL:
-- MySQL dump 10.9
--
-- Host: localhostDatabase: mysql
-- --
-- Server version   4.1.8-standard


-- 
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: About mysqldump

2006-06-22 Thread Dilipkumar

Hi,

Take the dump using --tab which will give you .txt and .sql file.
Move the dump to the new version of mysql and try using load data infile 
'/tmp/user.txt' into table user;



Jørn Dahl-Stamnes wrote:


On Thursday 22 June 2006 04:00, Daniel da Veiga wrote:
 


On 6/21/06, Jørn Dahl-Stamnes [EMAIL PROTECTED] wrote:
   


On Wednesday 21 June 2006 17:17, Barry wrote:
 


Jørn Dahl-Stamnes schrieb:
   


Is it possible to get mysqldump to include rights that has been
GRANTED to a database or to tables in the database that is being
dumped?
 


Dump the Grant tables?
   


I have though of it. Currently I am dumping the mysql database, but there
is a lot of tables that I probably don't need.

Based on a dump of the mysql database, I guess that the following tables
are the one I need to dump:

mysql.db
mysql.table_privs
mysql.user

Comments?
 


Isn't the hosts table needed too?!
   



Maybe, but it is empty on my sql-server.

BTW, I'm using an older version of MySQL:
-- MySQL dump 10.9
--
-- Host: localhostDatabase: mysql
-- --
-- Server version   4.1.8-standard


 




--
Thanks  Regards,
Dilipkumar
DBA Support


** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail  notify us 
immediately at [EMAIL PROTECTED]


Watch India vs. England LIVE, Hot videos and more only on Sify Max! Click Here. 
www.sifymax.com

Get to see what's happening in your favourite City on Bangalore Live! 
www.bangalorelive.in



About mysqldump

2006-06-21 Thread Jørn Dahl-Stamnes
Is it possible to get mysqldump to include rights that has been GRANTED to a 
database or to tables in the database that is being dumped?

-- 
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: About mysqldump

2006-06-21 Thread Barry

Jørn Dahl-Stamnes schrieb:
Is it possible to get mysqldump to include rights that has been GRANTED to a 
database or to tables in the database that is being dumped?



Dump the Grant tables?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: About mysqldump

2006-06-21 Thread Jørn Dahl-Stamnes
On Wednesday 21 June 2006 17:17, Barry wrote:
 Jørn Dahl-Stamnes schrieb:
  Is it possible to get mysqldump to include rights that has been GRANTED
  to a database or to tables in the database that is being dumped?

 Dump the Grant tables?

I have though of it. Currently I am dumping the mysql database, but there is a 
lot of tables that I probably don't need.

Based on a dump of the mysql database, I guess that the following tables are 
the one I need to dump:

mysql.db
mysql.table_privs
mysql.user

Comments?

-- 
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: About mysqldump

2006-06-21 Thread Daniel da Veiga

On 6/21/06, Jørn Dahl-Stamnes [EMAIL PROTECTED] wrote:

On Wednesday 21 June 2006 17:17, Barry wrote:
 Jørn Dahl-Stamnes schrieb:
  Is it possible to get mysqldump to include rights that has been GRANTED
  to a database or to tables in the database that is being dumped?

 Dump the Grant tables?

I have though of it. Currently I am dumping the mysql database, but there is a
lot of tables that I probably don't need.

Based on a dump of the mysql database, I guess that the following tables are
the one I need to dump:

mysql.db
mysql.table_privs
mysql.user

Comments?



Isn't the hosts table needed too?!

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Hi,All ,About mysqldump and mysqlimport

2003-03-30 Thread Li Yang
Hi, I'm a newbie to MySQL
 I have use mysqldump to backup a database to an file named test.sql ,but how I 
can load the test.sql to create the same database to another server??
Thanks!
 
Best Regards
Li Yang



RE: Hi,All ,About mysqldump and mysqlimport

2003-03-30 Thread Cal Evans
Edit the script created by mysqldump.  Add

create database if not exists databaseName;

to the beginning of the script.

Or what I usually do is create the database first then use:

mysql -A databaseName  test.sql

to load it.

=C=

* Cal Evans
* http://www.christianperformer.com
* Stay plugged into your audience


-Original Message-
From: Li Yang [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 30, 2003 8:10 PM
To: mysql
Subject: Hi,All ,About mysqldump and mysqlimport


Hi, I'm a newbie to MySQL
 I have use mysqldump to backup a database to an file named test.sql
,but how I can load the test.sql to create the same database to another
server?? Thanks!
 
Best Regards
Li Yang



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



about mysqldump

2002-03-21 Thread Chetan Lavti

Hi,
I want to know, whether the recovery from the file created using
mysqldump, 
will also recover the foreign key between the tables.
because when I am doing this it doesn't seems like that..
when I am doing recovery I am loosing all the foreign keys of by
database tables.
please, tell me it is affecting my database backup and recovery...

Thanks and regards,
Chetan




-
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