ripper234
ripper234

Reputation: 230028

Setting to cause a connection to never lock?

Is there a setting (connection string or other) that makes all queries issued via a specific connection to never lock the tables?

I'm considering having a debug read only mode for my app, that will connect to production for debugging/data analysis purposes. I'm not sure this is a great idea, and want to protect myself as much as possible if I do it.

(If you question whether I should do it or not, please do so in a comment - the question is about the existance of such a setting, not why I should or shouldn't use it)

Upvotes: 2

Views: 43

Answers (2)

che
che

Reputation: 12263

SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITED might do the trick. Look at isolation level docs in the manual.

Upvotes: 1

hd1
hd1

Reputation: 34657

According to http://forums.developer.mindtouch.com/showthread.php?1044-giving-a-mysql-user-read-only-privileges (untested), just grant your debug user select privileges only and that should solve your problem.

Upvotes: 0

Related Questions