Hi Madan, Nice to hear that you have got started up in MySQL and setup your first replication setup.
MySQL has SSL replication that can be configured between master and slave if you feel that data is going to be transferred outside the network, I don't think that you will face such a scenario. People usually have the master and slave in a single network usually, which is protected from the external access. It is good to have access restrictions to all the users who access the database and give only access that is required. It is better to have security from the network level thank the database level. You can have hardware or software load balancer that can share the load between all the masters and slave. Yes your application should be written to distinguish between select queries and data modification queries. Fail over can be done by swapping the IP's between the master and the slave, by having a floating IP that is available in the master. You can have Heatbeat service do this task for you. Regards, Chandru. www.mafiree.com On Sun, Nov 30, 2008 at 3:09 AM, Madan Thapa <[EMAIL PROTECTED]>wrote: > Hi, > > First of all I am newbie to MySQL administration, so if my questions seem > weird, please forgive me. > > > > I am testing a mysql-slave setup on test nodes and was successful in > setting > it up. Here are the results. Please note this is a basic setup, I will > explore more options that can be added to my.cnf , if required. > > > mysql> show slave status\G > *************************** 1. row *************************** > Slave_IO_State: Waiting for master to send event > Master_Host: 192.168.0.1 > Master_User: slaveuser > Master_Port: 3306 > Connect_Retry: 60 > Master_Log_File: mysql-bin.000002 > Read_Master_Log_Pos: 98 > Relay_Log_File: mysql-relay-bin.000003 > Relay_Log_Pos: 235 > Relay_Master_Log_File: mysql-bin.000002 > Slave_IO_Running: Yes > Slave_SQL_Running: Yes > Replicate_Do_DB: > Replicate_Ignore_DB: > Replicate_Do_Table: > Replicate_Ignore_Table: > Replicate_Wild_Do_Table: > Replicate_Wild_Ignore_Table: > Last_Errno: 0 > Last_Error: > Skip_Counter: 0 > Exec_Master_Log_Pos: 98 > Relay_Log_Space: 235 > Until_Condition: None > Until_Log_File: > Until_Log_Pos: 0 > Master_SSL_Allowed: No > Master_SSL_CA_File: > Master_SSL_CA_Path: > Master_SSL_Cert: > Master_SSL_Cipher: > Master_SSL_Key: > Seconds_Behind_Master: 0 > 1 row in set (0.00 sec) > > mysql> > > > > > 2) Can you advise, what security considerations are to be taken into > account > for a master - slave setup? > > 2) In order to distribute load, how can we make writes on master only and > reads on both? It seems to be, it is something that has to be handled at > script coding, instead of administration level, am I right? > > In that case, should applications be developed to write to master and read > on both master and slaves, what considerations are to be taken into > account, > so that we can switch to slave quickest enough to avoid outage length, > should the master node crash? > > > > Thank you. >