At 4:47 PM -0400 9/15/03, Peter Koutsoulias wrote:
I've been trying this for a few hours now and I'm not sure what's going on.

mysqldump --host=localhost --user=root --password=mypass dbname >
dbname.dump

This works fine, it creates a text file with CREATE TABLE blocks and INSERT
statements for each table in the database.  When I try to recreate this db
on another server using mysqlimport:

mysqlimport -u root -p dbname 'dbname.dump'

mysqlimport is not the complement of mysqldump, it is a command-line interface to the LOAD DATA INFILE statement.

To import the dump file, use mysql:

mysql -u root -p dbname < dbname.dump



I keep getting the error:


Error: Table 'dbname.dbname' doesn't exist, when using table: dbname

My question: Why is mysqlimport interpreting the dbname argument as a table
name?
From the documentation for mysql 4.8.8:


mysqlimport is invoked like this:
shell> mysqlimport [options] database textfile1 [textfile2 ...]


It's not doing that. It's taking the argument database and using it as the name of a table instead. I checked to make sure I didn't have any CREATE TABLE dbname statements to make sure it wasn't the dump file trying to do this, but it's not. The command line for some reason is trying to make a table called dbname.dbname.

I assumed that the mysqlimport would just create the necessary tables using
the dumpfile.  Anyone have a similar problem?

Peter.


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


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



Reply via email to