[talk] Databases

Sujit K M kmsujit at gmail.com
Mon Oct 17 11:40:43 EDT 2016


On Mon, Oct 17, 2016 at 7:57 AM, N.J. Thomas <njt at ayvali.org> wrote:
> * Sujit K M <kmsujit at gmail.com> [2016-10-15 18:42:05+0530]:
>> I was recently looking at databases or infact user who are readonly. I
>> wanted to know whether MySQL on FreeBSD happens to have a write
>> configuration which lets you disable the write part totally.
>
> If I understood you correctly, I think what you want is to create a user
> and grant them only read permissions. Here's the syntax for the GRANT
> command:
>
>     http://dev.mysql.com/doc/refman/5.7/en/grant.html
>
> You can do this at the database or table level.

I was more interested in making the mysql server itself readonly. The below link
suggested something but I haven't verified it as of yet. I also find
Slaves being
made readonly though not currently advisable in production.

https://dev.mysql.com/doc/refman/5.6/en/innodb-read-only-instance.html

My set of thinking on is on the below lines.
"If we make an Database read only then we need to return 0 in the case of
Insert/Update statements", 0 being the number of records which are inserted.



More information about the talk mailing list