LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   MySQL Replication (https://www.linuxquestions.org/questions/linux-server-73/mysql-replication-495799/)

ACDII 10-26-2006 12:16 PM

MySQL Replication
 
Has anyone done this? I am looking to have the same database on two servers that run Tacacs. The master would be the server that has teh webfront for the Tacacs, but both servers run their own version of Tacacs using the same information in the database. I found documentation regarding setting up replication, but it also pushes ALL the databases, not just a select few. One server is just running Tacacs, the other is also running a few other programs that use MySQL, and I dont want those databases to be replicated.

What I am wondering is if I have the one server that has just the one Database as the master, can I have multiple databases on the Slave server?

J_K9 10-26-2006 01:58 PM

Hmm... Well, instead of replicating, you could always allow remote (authenticated) access to mysqld and set Tacacs on the secondary server to use the master server's database directly (and remotely)? This seems far simpler than constant replication - using your method, if your database were altered often, you'd waste one heck of a lot of bandwidth sending that data to your secondary server. But that's just MHO :)

ACDII 10-26-2006 03:24 PM

Quote:

Originally Posted by J_K9
Hmm... Well, instead of replicating, you could always allow remote (authenticated) access to mysqld and set Tacacs on the secondary server to use the master server's database directly (and remotely)? This seems far simpler than constant replication - using your method, if your database were altered often, you'd waste one heck of a lot of bandwidth sending that data to your secondary server. But that's just MHO :)

If I can get the Webui to do it, that is my preferred method instead of trying to maintain two databases. I will see if I can point the tacacs program itself to a different database via IP, but not quite sure how to do it. Linux is still fairly new to me, as I am too used to widoze, but heavy into Cisco CLI, its the placement of files that is taking me those most time learning, then learning how each program works after I locate them is the next thing. :D At least I get paid to play with them! :D

ACDII 10-27-2006 11:18 AM

Quote:

Originally Posted by J_K9
Hmm... Well, instead of replicating, you could always allow remote (authenticated) access to mysqld and set Tacacs on the secondary server to use the master server's database directly (and remotely)? This seems far simpler than constant replication - using your method, if your database were altered often, you'd waste one heck of a lot of bandwidth sending that data to your secondary server. But that's just MHO :)

On further thought this would NOT work. If the Tacacs server that has the DB on it goes down, the secondary server has no DB to use, and would be worthless. I tried it out and tested it, actually got it working too, but when I broke the link, tacacs failed to work. Looks like I will need two DB afterall, so the question remains, can I have more DB's on the Client, than there are on the Master? I want to set the master on the primary Tacacs server, which is running a lower rev of MySQL and cannot be upgraded at this time, but only has one DB on it, the CLient will have Two additional DB's that are currently on it, and will be the secondary Tac server.

leandean 10-28-2006 11:28 AM

In replication the slave can have any number of databases from any number of masters using multiadmin. Also, the slave will replicate only the databases it knows about. i.e: Standard procedure is to not replicate the mysql db. That prevents breaking replication when you add or delete a user to the master.

However, you will not be able to modify the slave. Only use it for reports, backup, etc.

ACDII 12-18-2006 08:08 AM

Has anyone that does replication have the slave database get wiped out? It was working perfectly for weeks and then all of a sudden the one tacacs stopped taking requests and I found that its database was basically wiped out, only one table remained, the rest disappeared. How can a database get wiped without a drop being issued? The master database OTOH was fine, I was able to restore the busted one off of it.


All times are GMT -5. The time now is 04:59 PM.