0

We are kind of struggling while creating the infrastructure for our BI sector.

I had read on this link that it is possible to create views on a read-only slave. Still, when I run the query I get

"The MySQL server is running with the --read-only option so it cannot execute this statement."

Is there any way to acomplish this?

Or if it's not, is it possible to be able to have 2 MySQL masters one way sync, without loosing our views? (It's kind of a fake slave).

Our problem is that we won't nor want write access to the master server in order to create our views, and just in case both options aren't possible, is any way to achive something similar?

LowlyDBA - John M
11.1k11 gold badges46 silver badges63 bronze badges
asked Nov 2, 2018 at 19:32
2
  • Did that error message come from CREATE VIEW? Or from using the view? (Your question is ambiguous.) Commented Nov 3, 2018 at 1:48
  • From the view creation. Commented Nov 5, 2018 at 16:33

1 Answer 1

0

It should be possible to make the slave read/write by disabling read_only. SET GLOBAL read_only=0, and changing it in the my.cnf configuration file.

Using GRANT you can create a user with SELECT, CREATE VIEW at

GRANT SELECT, CREATE VIEW ON *.* TO bob@localhost;

This should leave the user with enough access to do BI work on a slave without modifying data.

answered Nov 3, 2018 at 0:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.