[nycphp-talk] Data import from MySQL 3.23 to MySQL 4.0
Maggie Cassidy
maggie.cassidy at avaion.com
Fri Jan 7 11:07:27 EST 2005
Can you force backticks on mysqlimports? I’ve tried unsuccessfully.
We have an existing database that has a few key words as table names (group,
status) and the mysqlimports for those tables fail.
In the future, we are migrating the database to Oracle, so we’re also
wondering if this will also be a problem with Oracle?
Maggie Cassidy
_____
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Allen Shaw
Sent: Thursday, January 06, 2005 2:23 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Data import from MySQL 3.23 to MySQL 4.0
And, incedentally, if you're using mysqldump to export the data, there's an
option to force backticks on table and column names:
--quote-names, -Q
Quote database, table, and column names within ``' characters. If the server
SQL mode includes the ANSI_QUOTES option, names are quoted within `"'
characters. As of MySQL 4.1.1, --quote-names is on by default, but can be
disabled with --skip-quote-names.
- A.
Allen Shaw wrote:
SHOW is a keyword in 4.0. Try using backticks so mysql knows you're
defining a column name and not a SHOW statement:
... pic varchar(50) default NULL,
`show` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (s_id) ...
- Allen
Ajai Khattri wrote:
Im trying to import data from a database in MySQL 3.23 to another server
using MySQL 4.0.
Im getting an error creating this table:
ERROR 1064 at line 47: You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version for the right syntax to
use near 'show tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (s_
The SQL looks like this:
CREATE TABLE items (
s_id int(10) unsigned NOT NULL auto_increment,
title varchar(100) default NULL,
description tinytext,
price float default NULL,
pic varchar(50) default NULL,
show tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (s_id)
) TYPE=MyISAM;
Anyone know offhand what changed and how I can modify this to complete the
import?
--
===========================================================
Allen Shaw HYPERLINK
"mailto:ashaw at iifwp.org"ashaw at iifwp.org
IIFWP Data and 914.631.1331 x.106
IT Services HYPERLINK
"http://www.iifwp.org"http://www.iifwp.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.823 / Virus Database: 561 - Release Date: 12/26/2004
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 1/6/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 1/6/2005
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050107/527934e1/attachment.html>
More information about the talk
mailing list