开发者

How can I lock a database in MySQL so that >1 instances of same user are prohibited?

If I use flush tables with read lock; to lock all my tables, but I have >1 processes who are using the same username & password to acc开发者_JAVA百科ess the database, how can I tell MySQLd to only allow one client at a time?

Thanks.


I'm not sure why you think you need it, but tou can change the max_user_connections limit for the user and set it to 1:

  • http://dev.mysql.com/doc/refman/5.5/en/user-resources.html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜