Hi,

Have you tried access the database from the command line with your user and
password?

mysql -u <someuser> -p<mypass> mydatabase

to see if it's not a access problem to mysql itself?

Regards,

Rick

----- Original Message -----
From: "Sylwester S. Biernacki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 02, 2001 7:27 PM
Subject: MySQL-3.23.46 & Vpopmail 5.0


Hi,

It's 1am here and my eyes aching me so much I can't write ;-)

I was doing an upgrade of my oldie mysqld version (which doesn't
support replication :>) to the "newest" 3.23.46.
And after the upgrade I'm getting this message:

[root@areion vpopmail-5.0]# telnet 0 110
Trying 0.0.0.0...
Connected to 0 (0.0.0.0).
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user [EMAIL PROTECTED]
+OK
pass xxx
could not connect to mysql update server
-ERR authorization failed
Connection closed by foreign host.

When I turn off the new version of mysql and start the old version,
everything works fine:
[root@areion vpopmail]# telnet 0 110
Trying 0.0.0.0...
Connected to 0 (0.0.0.0).
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user [EMAIL PROTECTED]
+OK
pass xxxx
+OK
stat
+OK 147 595576
quit
+OK
Connection closed by foreign host.

I was testing it on 5.0pre5 so I thought: Maybe I'm stupid, and sth
wrong configured in that version. I've downloaded the 5.0 final, and
run configure with these parameters:

./configure  --prefix=/home/vpopmail --enable-qmaildir=/var/qmail --enable-a
[EMAIL PROTECTED]
--enable-logging=y --enable-default-domain=obeer.com --enable-mysql=y --enab
le-large-site=y
--enable-incdir=/usr/local/mysql/include/mysql --enable-libdir=/usr/local/my
sql/lib/mysql
--enable-libs=mysqlclient --enable-apop=y --enable-roaming-users=y
--enable-tcpserver-file=/home/vpopmail/etc/tcp.smtp --enable-relay-clear-min
utes=15
--enable-auth-logging=y --enable-valias=y --enable-passwd=n --enable-hardquo
ta=5000000
--enable-qmail-ext=y --enable-mysql-replication=n

after that I got:
           vpopmail 5.0
            Current settings
---------------------------------------

vpopmail directory = /home/vpopmail
               uid = 499
               gid = 499
          ip alias = OFF --enable-ip-alias-domains=n (default)
address extentions = ON  --enable-qmail-ext=y
     roaming users = ON  --enable-roaming-users=y
    tcpserver file = /home/vpopmail/etc/tcp.smtp
    open_smtp file = /home/vpopmail/etc/open-smtp
        user quota = 5000000 -enable-hardquota=5000000
       auth module = mysql --enable-mysql=y
 mysql replication = OFF --enable-mysql-replication=n default
table optimization = many domains --enable-many-domains=y default
  system passwords = OFF --enable-passwd=n default
      file locking = ON  --enable-file-locking=y default
         file sync = ON  --enable-file-sync=y default
      auth logging = ON  --enable-auth-logging=y
     mysql logging = OFF --enable-mysql-logging=n default
mysql clear passwd = OFF --enable-clear-passwd=n default
 valias processing = ON  --enable-valias=y
        pop syslog = show successful and failure login attempts
                     --enable-logging=y
    default domain = obeer.com --enable-default-domain=obeer.com
          auth inc = -I/usr/include/mysql
          auth lib = -L/usr/lib/mysql  -lmysqlclient -lz

So I looked carrefully the line:
 mysql replication = OFF --enable-mysql-replication=n default

It seems to be good. SO I've modified vmysql.h file:
/* Edit to match your set up */
#define MYSQL_UPDATE_SERVER "localhost"
#define MYSQL_UPDATE_USER   "vpop_auth"
#define MYSQL_UPDATE_PASSWD "secretpassword"

#define MYSQL_READ_SERVER   ""
#define MYSQL_READ_USER     ""
#define MYSQL_READ_PASSWD   ""
/* End of setup section*/

Than I've compiled it (make; make install-strip), run the new mysql
version and gotta the same message:
[root@areion vpopmail-5.0]# telnet 0 110
Trying 0.0.0.0...
Connected to 0 (0.0.0.0).
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user [EMAIL PROTECTED]
+OK
pass xxx
could not connect to mysql update server
-ERR authorization failed
Connection closed by foreign host.


I've looked at all of the config files:
[root@areion vpopmail-5.0]# rgrep "#define MYSQL_REPLICATION" *
configure:#define MYSQL_REPLICATION $MYSQL_REPLICATION
[root@areion vpopmail-5.0]# grep "MYSQL_REPLICATION" config.h
/* #undef MYSQL_REPLICATION */
[root@areion vpopmail-5.0]#

Everything seems to be OK.
So WTF is going on ? I don't know.
My OS is Linux, mysql doesn't use my.cnf, replication was there cause
I've installed binary version (I've made rpm --rebuild on my linux box
and then installed this rpm files).

I haven't tried with compiling mysql myself, but I've looked at
mail-archive.com and found Ken's words:

http://www.mail-archive.com/vchkpw@inter7.com/msg04656.html
Good point. This mysql replication stuff should probably get
a good READ me file too.

Here is what is in the vmysql.h file now:

/* Edit to match your set up
*
* If you are NOT using mysql replication:
* Then edit the UPDATE server with your mysql authentication
* information. The READ server is not used
*
* If you are using mysql replication:
* Set the UPDATE server to be your master
* and set the READ server to be your slave
*
*/

This is assuming two types of mysql setups
1) Just one server, like a standard mysql setup.

2) Mysql replication setup with a single master
  and a local slave.

There isn't any code to do updates to multiple
servers. Best to leave that *major* headache
to the mysql developers.

Ken
[cut]

In my config files it's exactly as Ken wrote... So who's gonna tell me
what I'm doing wrong ?

Sylwester S. Biernacki <[EMAIL PROTECTED]>



Reply via email to