日期:2014-05-16  浏览次数:20707 次

如何设置mysql 指定数据库为只读
host=127.0.0.1;username=test;password=123;datebase=mytest

如何把mytest数据库设置为只读

root的密码为123456

设置完只读后需要再恢复过来

------解决方案--------------------
flush tables with read lock

或者

set global read_only=1 这个拥有super权限的仍然可以写操作