#3 multiple DB hosts


It would be nice if the AuthMySQLHost directive could
be used more dynamically, such as AuthMySQLHost1
...Host2 ....Host3 on seperate lines. If Host1 could
not be contacted, it would try Host2 and so on.


  • Jerry Stuckle

    Jerry Stuckle - 2004-09-08

    Logged In: YES

    This sounds reasonable, but it might be difficult to
    implement. I'll have to think about it and see what I can
    come up with.

  • Jerry Stuckle

    Jerry Stuckle - 2004-09-08
    • assigned_to: nobody --> jstuckle
  • J Freed

    J Freed - 2004-12-05

    Logged In: YES

    They way you can get around a problem like this is to just
    setup replication with MySQL.

    In my setup I have a master database server, which houses
    the primary copy of authentication info. Then, on each
    webserver I have MySQL running as a slave to that master.
    Setup mod_auth_mysql to query the localhost database.
    (You'll also need to be sure that however you add users,
    change passwords, etc will point at the master server)

    In doing it this way, you are quite redundant. You can lose
    the master server and still continue to serve authenticated
    pages to your users because you have a copy of the data from
    the master. The only inconvenience to your users is that
    they cannot change passwords (or add new users) until the
    master server is back up and running.

    Just a thought. I figure it's probably more reliable than
    having mod_auth_mysql try one server, time out, try another,

  • Jerry Stuckle

    Jerry Stuckle - 2004-12-06

    Logged In: YES

    I don't think replication is the answer here. The problem
    is - if Host1 is down, there is nothing in mod_auth_mysql to
    allow checking through another host.

    I haven't forgotten about this request (which is why I like
    it in the enhancement section). I'm looking through the
    whole host/connection process to see how it can be
    streamlined and work with less overhead (and work with
    multiple hosts). This request is part of it.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks