Jon Haworth wrote:
> Hi list,
>
> Sorry if this appears twice, our mail server is playing up at the moment.
>
> We've got an sql file that was created using mysqldump on an NT box. The
> info in this file needs to be imported into MySQL on a Linux box. When I run
>
> /usr/local/mysql/bin/mysql < /home/jon/dump.sql
/usr/local/mysql/bin/mysql foo < /home/jon/dump.sql
You might be loading into table foo of a different database than you think.
>
> I get "Error 1062 at line 50: duplicate entry '1' for key 1".
>
>
> The guilty area of the sql file looks like this:
>
alternately add here:
use foo;
> CREATE TABLE foo (
> ID int(10) unsigned NOT NULL auto_increment,
> Tag varchar(50) NOT NULL default '',
> Category varchar(50) NOT NULL default '',
> PRIMARY KEY (ID)
> ) TYPE=MyISAM;
>
> INSERT INTO foo VALUES (1,'some text','some more text'); /* line 50! */
> INSERT INTO foo VALUES (2,'some text','some more text');
> INSERT INTO foo VALUES (3,'some text','some more text');
> ....etc
>
>
> The /usr/local/mysql/data/foo directory is empty, all I've done is enter
> "create database foo" into the mysql console.
>
> Aaargh! What am I missing? This sql file was created by MySQL and I haven't
> altered it apart from putting a "USE MyDatabase" line at the top.
>
> Any ideas?
>
>
> Cheers
> Jon
>
>
>
>
>
>
> _______________________________________________________
> Get 100% private, FREE email for life from Excite UK
> Visit http://inbox.excite.co.uk/
>
>
> ---------------------------------------------------------------------
> 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
--
Gerald L. Clark
[EMAIL PROTECTED]
---------------------------------------------------------------------
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