besides Mario Giambanco the point of the local file permission with the wrong user. the database starts itself in read only if it crashed sometimes.
And you can check the global variables dev.mysql.com/doc/refman/5.7/en/replication-solut…
where it can be set to read only.