Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > mysqldump help please

mysqldump help please
Thread Tools
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jan 11, 2005, 08:47 PM
 
Hi, I'm trying to export a table to a file, but I can't figure out what option to use to remove this form the front of the file:

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;

Anyone know how to get mysqldump to exclude this info from the beginning and end?

Thanks!
     
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Jan 11, 2005, 09:21 PM
 
I've never had that on my dumps, and the only option I use is --opt .
[Wevah setPostCount:[Wevah postCount] + 1];
     
timmerk  (op)
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jan 11, 2005, 09:22 PM
 
Yah, it's strange. I'm using 4.1.7 standard.
     
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Jan 12, 2005, 07:11 AM
 
the newer versions add new features. they use this syntax to hide new stuff from previous versions. unfortunately the older versions can have trouble importing them.

there is a way to force it to use a target version.

I'd try something like this:

--compatible=no_key_options,no_table_options

( from mysqldump --help )

--compatible=name

Change the dump to be compatible with a given mode. By
default tables are dumped in a format optimized for
MySQL. Legal modes are: ansi, mysql323, mysql40,
postgresql, oracle, mssql, db2, maxdb, no_key_options,
no_table_options, no_field_options. One can use several
modes separated by commas. Note: Requires MySQL server
version 4.1.0 or higher. This option is ignored with
earlier server versions.
     
timmerk  (op)
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jan 12, 2005, 09:48 AM
 
Originally posted by Gavin:
the newer versions add new features. they use this syntax to hide new stuff from previous versions. unfortunately the older versions can have trouble importing them.

there is a way to force it to use a target version.

I'd try something like this:

--compatible=no_key_options,no_table_options

( from mysqldump --help )

--compatible=name

Change the dump to be compatible with a given mode. By
default tables are dumped in a format optimized for
MySQL. Legal modes are: ansi, mysql323, mysql40,
postgresql, oracle, mssql, db2, maxdb, no_key_options,
no_table_options, no_field_options. One can use several
modes separated by commas. Note: Requires MySQL server
version 4.1.0 or higher. This option is ignored with
earlier server versions.
That was one of the first things I tried, and it still shows up. Even using ansi, shows that extra text.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:01 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2