Unable to add master...

Comments

5 comments

  • Avatar
    David Thoms

    One thing I forgot to mention is the dummy master server that will not add properly is in super user read only mode.  IF not set in that fashion cluster control states that: 

    •  [19:30:57]:
      Found more than one writable node. This is not a recommended setup and may lead to data inconsistencies. Aborting.
    •  [19:30:57]:
      xxx.xxx.xxx.33:3306: Node is writable.
    •  [19:30:54]:
      xxx.xxx.xxx.22:3306: Node is writable.
    0
    Comment actions Permalink
  • Avatar
    Paul Namuag

    Hi David Thoms,

    The message you read is correct. Adding or importing a cluster requires a master where it is fully writable while the slave nodes are set to be read only, although this can be overridden but this is not the focus of the problem you are asking though. You can check if you are importing the correct node if that is supposed to be a master by checking,

    SELECT @@read_only, @@super_read_only; <-- both has to be 0 values to be a master

    SHOW SLAVE HOSTS;       <- must have slaves or hosts connected to it

    SHOW SLAVE STATUS \G       <- must be empty for a master unless you are doing a multi-master setup but again it might not be the case of your problem

     

     

    0
    Comment actions Permalink
  • Avatar
    David Thoms

    Please forgive me as I am new to this - so these questions might seem obvious to you.

     

    Why would the master node need to be read/writeable and the slave read only?  Why would you want to write to the master (assume the master is a production database) and have the slave as read only?

     

    Thank you for responding so fast,

    Dave Thoms

    1
    Comment actions Permalink
  • Avatar
    Sebastian Insausti

    Hi Dave,

    I'm not sure if I understood your question correctly.

    The idea to have a master-slave topology is that the master will be used to write (your application will use it) and the slave (or more than one) can be used to have high availability, reporting, backups, etc, so you can reduce the load in the master node using the slave for this kind of tasks, and to avoid any data inconsistency, the best is to have this slave node in a read-only mode.

    You can find more information here: https://severalnines.com/resources/database-management-tutorials/mysql-replication-high-availability-tutorial

    Please, let me know if this answers your question.

    Regards,

    Sebastian.

    0
    Comment actions Permalink
  • Avatar
    David Thoms

    Ok that makes sense now that you would want the database on the master to be writeable from the perspective of using it to do what databases do - record data and retrieve it.  I was thinking more from the perspective of the severalnines cluster software being able to write to it.  Thank you!

    Here's my next issue - if I "Import Existing Server/Database" it complains if I set both hosts (assume one slave and one master, I don't care which is which as these are dummy servers) to writable and fails.  If I set one readonly and one readwrite it invariable sets the readonly server to 'red' as shown in the picture inserted:

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk