[nycphp-talk] Data import from MySQL 3.23 to MySQL 4.0
ashaw at iifwp.org
Thu Jan 6 14:23:24 EST 2005
And, incedentally, if you're using mysqldump to export the data, there's
an option to force backticks on table and column names:
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|.
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 ashaw at iifwp.org
IIFWP Data and 914.631.1331 x.106
IT Services http://www.iifwp.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk