incubator-olio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liang Zhao <alpha....@gmail.com>
Subject olio/rails for mysql replication
Date Tue, 01 Feb 2011 05:22:18 GMT
Dear All,

I'm running olio/rails on jdk (1.6.0), rails (2.3.8), mysql (5.1.41)
on Amazon EC2. Everything works fine when I connect olio/rails to a
single mysql.

However, problem comes when I changed the single mysql to mysql
replication (with one master and one slave, both can communicate with
each other and work fine). In order to use mysql replication in
olio/rails, I made following changes to configurations of Data Servers
form:

   1.  I changed "JDBC driver class name" from
           "com.mysql.jdbc.Driver" to
           "com.mysql.jdbc.ReplicationDriver".
    2. I changed "JDBC connection URL" from
          "jdbc:mysql://host/olio?user=olio&password=olio&relaxAutoCommit=true&sessionVariables=FOREIGN_KEY_CHECKS=0"
to
          "jdbc:mysql:replication://master,slave/olio?user=olio&password=olio&relaxAutoCommit=true&sessionVariables=FOREIGN_KEY_CHECKS=0"

The Olio complains "Error connecting to DB",
          "com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
            The last packet sent successfully to the server was 0
milliseconds ago. The driver has not received any packets from the
server."

I think there is something wrong with my configurations, but I can't
tell where? It would be appreciated if someone can give me a hint,
many thanks.

--

Cheers!

Liang Zhao

Mime
View raw message