Hi Siju,

On Thu, Jul 14, 2011 at 04:26:43PM +0530, Siju George wrote:
> Also Forgot to add
> 
> 1) MySQL Client on HaProxy can connect to Amazon RDS.
> 
> 
>  mysql-client-5.1                5.1.54-1ubuntu4
> 
> ========================================================================
> 
> root@lb1:/var/software/hap15/haproxy-1.4.15# mysql -h
> xxxxxxxx.rds.amazonaws.com -u haproxy
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 2580937
> Server version: 5.5.12-log Source distribution
> 
> Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
> This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> and you are welcome to modify and redistribute it under the GPL v2 license
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
> 
> mysql> show grants;
> +-------------------------------------------------+
> | Grants for [email protected]                |
> +-------------------------------------------------+
> | GRANT USAGE ON *.* TO 'haproxy'@'12.11.2.6' |
> +-------------------------------------------------+
> 1 row in set (0.06 sec)
> 
> mysql>
> =======================================================
> 
> Amazon RDS is on MySQL 5.5

We have a fix for this in the latest 1.4 snapshot that will be released
as 1.4.16 as soon as I can check that nobody remains to be backported
from 1.5.

Hervé Commowick noticed that mysqld >= 5.5 wants the client to announce
4.1+ auth support and proposed a change.

You may want to apply this simple change to your 1.4.15 which I'm sure
will fix the issue :

     http://git.1wt.eu/web?p=haproxy.git;a=commitdiff_plain;h=212f778d6

(just add "curproxy->check_req[5] = 128;" after check_req[3]) as in the
patch below.

Regards,
Willy

---
From: Hervé COMMOWICK <[email protected]>
Date: Fri, 10 Jun 2011 12:05:59 +0000 (+0200)
Subject: [BUG] checks: fix support of Mysqld >= 5.5 for mysql-check
X-Git-Url: 
http://git.1wt.eu/web?p=haproxy.git;a=commitdiff_plain;h=212f778d6a7ffe270cdeaed7fc9a29891c4962cd

[BUG] checks: fix support of Mysqld >= 5.5 for mysql-check

mysqld >= 5.5 want the client to announce 4.1+ authentication support, even if 
we have no password, so we do this.
I also check on a debian potato mysqld 3.22 and it works too so i assume we are 
good from 3.22 to 5.5.

[WT: this must be backported to 1.4]
---

diff --git a/doc/configuration.txt b/doc/configuration.txt
index b22ac98..dde0c54 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -3583,7 +3583,7 @@ option mysql-check [ user <username> ]
   Remember that this does not check database presence nor database consistency.
   To do this, you can use an external check with xinetd for example.
 
-  The check requires MySQL >=4.0, for older version, please use TCP check.
+  The check requires MySQL >=3.22, for older version, please use TCP check.
 
   Most often, an incoming MySQL server needs to see the client's IP address for
   various purposes, including IP privilege matching and connection logging.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 7a572fb..2a08594 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -3476,6 +3476,7 @@ stats_error_parsing:
                                                        ((unsigned char) 
(packetlen >> 16) & 0xff));
 
                                                curproxy->check_req[3] = 1;
+                                               curproxy->check_req[5] = 128;
                                                curproxy->check_req[8] = 1;
                                                memcpy(&curproxy->check_req[9], 
mysqluser, userlen);
                                                curproxy->check_req[9 + userlen 
+ 1 + 1]     = 1;






> 
> thanks
> 
> --Siju
> On Thu, Jul 14, 2011 at 3:59 PM, Siju George <[email protected]> wrote:
> > On Wed, Jul 13, 2011 at 6:23 PM, Cyril Bonté <[email protected]> wrote:
> >>
> >> This syntax was not supported in haproxy 1.4.8, it appeared in 1.4.9 with 
> >> a full handshake and a QUIT command to cleanly close the connection.
> >>
> >> http://haproxy.1wt.eu/git?p=haproxy-1.4.git;a=commitdiff;h=a1e4dcfe5718311b7653d7dabfad65c005d0439b
> >>
> >
> > Thanks a million Cyril.
> > I compiled in haproxy 1.4.15 from the website.
> > But when started it gives the error.
> >
> > ==============================================================================================
> > Jul 14 15:51:11 localhost haproxy[5091]: Server
> > mysql-cluster/rds-master is DOWN, reason: Layer7 wrong status, code:
> > 0, info: "Client does not support authentication protocol requested by
> > server; consider upgrading MySQL client", check duration: 117ms. 1
> > active and 0 backup servers left. 0 sessions active, 0 requeued, 0
> > remaining in queue
> >
> > Jul 14 15:51:12 localhost haproxy[5093]: Server
> > mysql-cluster/rds-replica is DOWN, reason: Layer7 wrong status, code:
> > 0, info: "Client does not support authentication protocol requested by
> > server; consider upgrading MySQL client", check duration: 119ms. 0
> > active and 0 backup servers left. 0 sessions active, 0 requeued, 0
> > remaining in queue.
> >
> > Jul 14 15:51:12 localhost haproxy[5093]: proxy mysql-cluster has no
> > server available!
> > ===============================================================================================
> >
> > what could be the trouble?
> >
> > The mysql client version on the HAProxy system is
> >
> > mysql-client-5.1                5.1.54-1ubuntu4
> >
> > Thanks :-)
> >
> > --Siju
> >
> 

Reply via email to