coding freak Posted May 26, 2010 Share Posted May 26, 2010 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 More sharing options...
justsomeguy Posted May 26, 2010 Share Posted May 26, 2010 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 More sharing options...
coding freak Posted May 27, 2010 Author Share Posted May 27, 2010 Thanks man! I've just tested it and it seems to work like I needed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.