Jump to content

User privilege to make MySQL database read-only


coding freak

Recommended Posts

Hi there, perhaps someone here will be able to help me.What MySQL database user privilege is the most suitable to make database read-only. So, with this user my script will be able to read the whole database and only read. No writing. I want setup db with 2 users. I will switch to the default one when editing my website and after editing is done I will live the script connected to the db with read-only user. Is it SELECT privilege or something else? Thanks in advance for any suggestions. Cheers!

Link to comment
Share on other sites

Giving a user only the select privilege will mean that they're only able to get data out, they can't make any changes. They shouldn't need anything else than that, but it depends what queries you have in your code. If you have queries other than select queries that they'll need to be able to do then you'll need to grant those privileges also.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...