Recently a colleague of mine messed up with one of our databases. Hence I would like to know that is there a way to get a read-only connection to the MySQL Server
from the MySQL Workbench
? If not, is there a way by which we can set the autocommit
to false
(0
) by default?
EDIT: The problem is sometimes the same user has to make some modifications to the DB and also, I am not the System Admin to change such permissions. :) This sort of mess up happens when开发者_如何学编程 we are working with development environment, but due to some reason open a connection to production environment, say to have a look at a table or data in a table, and then just forget to switch back to development tab.
Set the permissions on the user that will be used to not have UPDATE
/ INSERT
permissions.
Create two users for two seperate connections. The connection that is normally used would have read only access. The other would be used only when making edits, then disconnected immediately. Not foolproof, but then again, nothing is.
精彩评论