DaveLinger Posted July 5, 2006 Share Posted July 5, 2006 we're having a problem somewhere and our configuration table keeps getting changed. Is there a way in MySQL to LOCK a table so it cannot be changed unless it is UN LOCKED?Thanks! Quote Link to comment Share on other sites More sharing options...
obsidian Posted July 5, 2006 Share Posted July 5, 2006 [quote author=DaveLinger link=topic=99529.msg391983#msg391983 date=1152113100]we're having a problem somewhere and our configuration table keeps getting changed. Is there a way in MySQL to LOCK a table so it cannot be changed unless it is UN LOCKED?Thanks![/quote]the best way to do that is to create the configuration table with an administrative account, and don't grant update rights to the user that the web application is using. that way, you can't "accidentally" or in any other way update the table without manually logging in with the database administrator account and changing them. Quote Link to comment Share on other sites More sharing options...
DaveLinger Posted July 5, 2006 Author Share Posted July 5, 2006 but can users still retrieve data from it with a normal non admin account? Quote Link to comment Share on other sites More sharing options...
Wildbug Posted July 5, 2006 Share Posted July 5, 2006 [quote author=DaveLinger link=topic=99529.msg392007#msg392007 date=1152115944]but can users still retrieve data from it with a normal non admin account?[/quote]Sure, read the manual section on GRANT usage. You'll see what types of permissions can be granted to users. You'd probably want an administrative account with GRANT ALL, but only SELECT permissions for a normal web user. Quote Link to comment Share on other sites More sharing options...
fenway Posted July 5, 2006 Share Posted July 5, 2006 You definitely want to use GRANTs, not LOCKs. Quote Link to comment Share on other sites More sharing options...
obsidian Posted July 10, 2006 Share Posted July 10, 2006 [quote author=fenway link=topic=99529.msg392220#msg392220 date=1152136750]You definitely want to use GRANTs, not LOCKs.[/quote]agreed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.