(mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Michael Williams

Hi All,

Having a bit of mysqldump trouble again.  I've looked over the  
documentation (again) and can't seem to find the flag to make  
'mysqldump' out put   CREATE TABLE IF NOT EXISTS.  Any ideas?


Regards,
Michael


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



Re: (mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Michael Williams
I appreciate the suggestion, but I'm not looking to drop anything.  I  
only want it as a safety net in the event that the table doesn't  
already exist.  I'm doing syncing of sorts, and I want the CREATE  
TABLE IF NOT EXISTS so as not to throw errors in the event that the  
table already exists, and to add if it's the first time a particular  
DB is syncing, etc.  I never want to drop.


Regards,
Michael

On Jan 16, 2006, at 6:22 PM, Jake Peavy wrote:


DROP TABLE IF NOT EXISTS?

On 1/16/06, Michael Williams [EMAIL PROTECTED] wrote:
Hi All,

Having a bit of mysqldump trouble again.  I've looked over the
documentation (again) and can't seem to find the flag to make
'mysqldump' out put   CREATE TABLE IF NOT EXISTS.  Any ideas?

Regards,
Michael


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







mysqldump: get both USE db_name and single tables

2005-12-14 Thread Michael Williams

Hi all,

In yet another predicament.  I'm wondering if there is any way to use  
the -B db_name  option while at the same time specifying the table  
name(s) to be exported.  The reason I ask is I am attempting to  
synchronize files from multiple databases from the dump files, and it  
would make things a great deal easier if I had the ability to output  
both USE db_name and still specify a subset of tables.


Thanks again,
Michael

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



mysqldump: getting it to dump INSERT IGNORE

2005-12-11 Thread Michael Williams

Hi All,

I have read thehttp://dev.mysql.com/doc/refman/5.0/en/ 
mysqldump.html and can find nothing regarding getting dump to  
INSERT IGNORE instead of simply INSERT INTO.  Is there any way to get  
INSERT IGNORE to be dumped?  Otherwise, I fear I may be forced to  
parse the dump file and do a few replacements.


Regards,
Michael

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



mysqldump: INSERTS for each individual record.

2005-12-10 Thread Michael Williams
When performing  mysqldump  is there any way to ensure that each  
record gets an INSERT of it's own?  I keep getting the following:


	INSERT INTO  'mytable' (1,'test item'), (2,'test item'), (3,'test  
item'), (4,'test item'), (5,'test item');


but I'd rather have

INSERT INTO  'mytable' (1,'test item');
INSERT INTO  'mytable' (2,'test item');
INSERT INTO  'mytable' (3,'test item');
INSERT INTO  'mytable' (4,'test item');
INSERT INTO  'mytable' (5,'test item');

because I'm doing my own line diff between files and it's much easier  
for me to have the items on individual lines.  Any assistance would  
be appreciated.


Regards,
Michael

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



MYSQLDUMP not responding to the PORT option

2005-12-02 Thread Michael Williams

Hi all,

I'm trying to use mysqldump over SSH.  I'm pretty familiar with  
port forwarding in and of itself, so I doubt that's the issue.  No  
matter what port I forward (or to where for that matter), mysqldump  
still connects to the local MySQL server and dumps local data.  It's  
as if it completely disregards my PORT option.  Any ideas?


My commands are as follows:

%ssh -L 8080:localhost:3306   remote_server_ip

	%mysqldump -u user_name --port=8080 --compact --quick --all- 
databases  dumpfile


Depending on the user_name it either fails or dumps my local data.   
It doesn't even use --port


Regards,
Michael

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



Re: SHOW commands.

2005-11-30 Thread Michael Williams
Thanks for the responses everyone.  Just a quick FYI, I am using  
Python as an intermediary to sync the DBs (I'm fine with using  
whatever as long as it's Debian compatible).  I suppose I should have  
explained before, but I'm using the Python script to connect from a  
client machine to a server machine which is why I prefer a  
command to be able to 'sync' the data.  Although I will have DB  
access on the server, there is no guarantee that I'll have actual  
disk write access.  Hence, again, the need to be able to query for  
the command so as to write it to a text file on the client machine  
for use, etc.  Sort of a  hey, server, what would it take to make  
table BLAH if I wanted to recreate it completely?  kind of thing.


Thanks again!


On Nov 30, 2005, at 12:02 AM, Rhino wrote:



- Original Message - From: Michael Williams  
[EMAIL PROTECTED]

To: mysql@lists.mysql.com
Sent: Tuesday, November 29, 2005 11:30 PM
Subject: SHOW commands.



Hi all,

Is there a command similar to SHOW CREATE TABLE. . . that will   
output the commands to fully duplicate a table; data and all?  I  
want  to retrieve the command and write it to a text file.


Basically what I need is a SHOW on CREATE TABLE copy SELECT *  
FROM original, but SHOW doesn't seem to work here.  I need a copy  
of this command so that I can then replicate that table as often  
as desired  in the future on whatever system is in place.  I could  
obviously dump  the entire db, but i only want this on a per table  
basis, as I deem necessary, whenever I deem it so.  Any help would  
be greatly  appreciated.


I think there is an option of mysqldump that lets you dump just a  
single, specified table. Maybe that would do the trick for you?


If not, and assuming you are running an appropriate version of  
MySQL, would a query on INFORMATION_SCHEMA.TABLES get you what you  
want? I'm still on V4.0.x so I'm not completely clear on what is  
available in the INFORMATION_SCHEMA.


If all else fails and you have a Java developer handy, you can  
write Java code to determine the composition of tables, even in  
MySQL 4.0.x; I know because I've done it.


Rhino


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/186 - Release Date:  
29/11/2005






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



SHOW commands.

2005-11-29 Thread Michael Williams

Hi all,

Is there a command similar to SHOW CREATE TABLE. . . that will  
output the commands to fully duplicate a table; data and all?  I want  
to retrieve the command and write it to a text file.


Basically what I need is a SHOW on CREATE TABLE copy SELECT * FROM  
original, but SHOW doesn't seem to work here.  I need a copy of this  
command so that I can then replicate that table as often as desired  
in the future on whatever system is in place.  I could obviously dump  
the entire db, but i only want this on a per table basis, as I deem  
necessary, whenever I deem it so.  Any help would be greatly  
appreciated.


Thanks in advance!

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



Large Index's Fail

2002-04-18 Thread Michael Williams

Okay, this may well be a LINUX issue I am having, so be kind before you
flame. 

When I try to index a large file, it fails with a write error on the /tmp
directory.  Now my /tmp directory is on a smaller partition (as sent to me
by dell).  Can I configure MySQL to use a different area when creating
indexes?  If not, would I have to configure something in the OS to use a
different partition as the temporary storage area.



-
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