Home  >  Article  >  Database  >  MySQL设置数据库表为只读

MySQL设置数据库表为只读

PHPz
PHPzOriginal
2016-06-01 11:52:232986browse


相关mysql视频教程推荐:《mysql教程

1、设置命令

mysql> use test;
Database changed
mysql> lock table t_depart_info read;
Query OK, 0 rows affected (0.00 sec)

2、插入数据

00486edd0ed19810cb872b1b8c30822.png

3、指令分析

由于设置了t_depart_info为只读,不能向其插入数据,故截图中一直在加载请求中...



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn