mysqldump and mysqlimport

2003-09-15 Thread Peter Koutsoulias
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'

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.


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



RE: Compling on RedHat 9

2003-09-12 Thread Peter Koutsoulias
Cheers mate!  It worked.  When I googled for that error, I had removed the
c:1790 part of the message (the link you provided has the exact same error
message except it occurs on a different line) so the page didn't come up.

I tried export CXX=gcc first because it was the easiest, and it didn't
work on my system.  However, after installing libstdc++devel and gcc-c++, it
worked like a charm.

Thanks again.

Peter.


-Original Message-
From: Lenz Grimmer [mailto:[EMAIL PROTECTED]
Sent: September 12, 2003 4:03 AM
To: Peter Koutsoulias
Cc: [EMAIL PROTECTED]
Subject: RE: Compling on RedHat 9


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Thu, 11 Sep 2003, Peter Koutsoulias wrote:

 OK, here are the last few lines from make.  I configured using the
 following:

 ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql

 errors:

 libmysql.c: In function `mysql_real_connect':
 libmysql.c:1790: warning: passing arg 5 of `gethostbyname_r' from
 incompatible pointer type
 libmysql.c:1790: too few arguments to function `gethostbyname_r'
 libmysql.c:1790: warning: assignment makes pointer from integer without a
 cast
 make[2]: *** [libmysql.lo] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2

 I tried ./configure without the --with-mysqld-user flag.  still the same
 errors.


Quoting http://www.mysql.com/doc/en/Compilation_problems.html:

If you get a compilation error on Linux (e.g. SuSE Linux 8.1 or Red
Hat Linux 7.3) similar to the following one:

libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
libmysql.c:1329: too few arguments to function `gethostbyname_r'
libmysql.c:1329: warning: assignment makes pointer from integer without a
cast
make[2]: *** [libmysql.lo] Error 1

By default, the configure script attempts to determine the correct
number of arguments by using g++ the GNU C++ compiler. This test yields
wrong results, if g++ is not installed. There are two ways to work around
this problem:

 o Make sure that the GNU C++ g++ is installed. On some Linux
   distributions, the required package is called gpp, on others it is
   named gcc-c++.
 o Use gcc as your C++ compiler by setting the CXX environment variable
   to gcc:

 export CXX=gcc

   Please note that you need to run configure again afterwards.

Bye,
LenZ
- --
 Lenz Grimmer [EMAIL PROTECTED]
 Senior Production Engineer
 MySQL GmbH, http://www.mysql.de/
 Hamburg, Germany

 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/YX25SVDhKrJykfIRAlasAKCA0dWrWOkxdG2bOsz7dyM5PASJpwCfSTiv
EVrsxrZaEyCeaREEYyfpVoA=
=ZEEP
-END PGP SIGNATURE-

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



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



Compling on RedHat 9

2003-09-11 Thread Peter Koutsoulias
I couldn't find an appropriate mailing list for compiling MySQL, so I
thought I'd try here.

anyone successfully compile MySQL 4 on RedHat 9?  I keep getting errors on
libmysql.c during the make step.  Google doesn't reveal a whole lot about
compiling MySQL on RedHat which leaves me to believe most people use RPMs.


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



RE: Compling on RedHat 9

2003-09-11 Thread Peter Koutsoulias
OK, here are the last few lines from make.  I configured using the
following:

./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql

errors:

libmysql.c: In function `mysql_real_connect':
libmysql.c:1790: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
libmysql.c:1790: too few arguments to function `gethostbyname_r'
libmysql.c:1790: warning: assignment makes pointer from integer without a
cast
make[2]: *** [libmysql.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I tried ./configure without the --with-mysqld-user flag.  still the same
errors.

Coincidently, I spent the entire day trying to figure out why I couldn't
compile qmail on my RedHat 9 box and found the answer.  Apparently, do to
changes in the new glibc, some older practices become incompatible with
glibc and cause a compile error.  With qmail, it was a simple fix, just find
the 3 affected files and add the #include errno.h header for each file.
Link if you're interested in also compiling qmail on RedHat 9 (I love qmail,
sendmail sucks): http://article.gmane.org/gmane.mail.qmail.general/13960

I wonder if the new glibc is also at play here.  I'm not educated on the art
of compiling, I just know how to untar packages, configure, and make them.
And, if I run into a problem, google's my only friend.  In this case, I
couldn't find much.

I've got the binaries working ok for now but sometimes it's just the
principle...I can't stand being beaten :)


At 10:22 AM -0400 9/11/03, Peter Koutsoulias wrote:
I couldn't find an appropriate mailing list for compiling MySQL, so I
thought I'd try here.

anyone successfully compile MySQL 4 on RedHat 9?  I keep getting errors on
libmysql.c during the make step.  Google doesn't reveal a whole lot about
compiling MySQL on RedHat which leaves me to believe most people use RPMs.

It would help if you showed your configure command and also the resulting
errors.  I keep getting errors isn't really very specific, and you're
less likely to get any useful response that way than if you provide details.


--
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]



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