Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql load balancing-failover

Status
Not open for further replies.

roycrom

Programmer
Aug 2, 2002
184
GB
Hi, mysql on 4.1.15 on RHL4.

I used to connect from web server to db server using user@host.

Now I have two web servers load balancing with one of the web servers combined with the db server.

Therefore, if i connect from the standalone web server I will connect as user@webserver, whereas if I connect from the web server which is also a db server, i will connect as user@localhost.

So my Mysql database currently contains just the user@webserver rows, without having to duplicate all my users to user@localhost is there another way to do this, such as deleting all records in the host field on the mysql.user and mysql.db tables and adding localhost and webserver to the mysql.host table?

I'm sorry if this is slightly difficult to understand, i suppose it is a strange thing i am trying to do.

------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla

roycrom :)
 
Use IP based addressing for both, you may want to also look at replication do automagically duplicate the data between the webservers

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top