MySQL里改read_only变量

MySQL里改read_only变量,第1张

概述MySQL里改read_only变量

下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。

内存溢出小编现在分享给大家,也给大家做个参考。

C:\documents and Settings\administrator>MysqL -u rootWelcome to the MysqL monitor.  Commands end with ; or \g.Your MysqL connection ID is 2Server version: 5.6.11 MysqL Community Server (GPL)copyright (c) 2000,2013,Oracle and/or its affiliates. All rights reserved.Oracle is a registered Trademark of Oracle Corporation and/or itsaffiliates. Other names may be Trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MysqL> show variables like 'read_only';+---------------+-------+| Variable_name | Value |+---------------+-------+| read_only     | OFF   |+---------------+-------+1 row in set (0.02 sec)MysqL> set global read_only=on;query OK,0 rows affected (0.00 sec)MysqL> show variables like 'read_only';+---------------+-------+| Variable_name | Value |+---------------+-------+| read_only     | ON    |+---------------+-------+1 row in set (0.00 sec)MysqL> use testDatabase changedMysqL> show tables;+----------------+| tables_in_test |+----------------+| y2k            |+----------------+1 row in set (0.00 sec)MysqL> select * from y2k;+------------+---------------------+---------------------+| date       | date_time           | time_stamp          |+------------+---------------------+---------------------+| 1998-12-31 | 1998-12-31 23:59:59 | 1998-12-31 23:59:59 || 1999-01-01 | 1999-01-01 00:00:00 | 1999-01-01 00:00:00 || 1999-09-09 | 1999-09-09 23:59:59 | 1999-09-09 23:59:59 || 2000-01-01 | 2000-01-01 00:00:00 | 2000-01-01 00:00:00 || 2000-02-28 | 2000-02-28 00:00:00 | 2000-02-28 00:00:00 |+------------+---------------------+---------------------+5 rows in set (0.19 sec)MysqL> insert into y2k values ('2000-02-29','2000-02-29 00:00:00',20000229000000);query OK,1 row affected (0.22 sec)MysqL> select * from y2k;+------------+---------------------+---------------------+| date       | date_time           | time_stamp          |+------------+---------------------+---------------------+| 1998-12-31 | 1998-12-31 23:59:59 | 1998-12-31 23:59:59 || 1999-01-01 | 1999-01-01 00:00:00 | 1999-01-01 00:00:00 || 1999-09-09 | 1999-09-09 23:59:59 | 1999-09-09 23:59:59 || 2000-01-01 | 2000-01-01 00:00:00 | 2000-01-01 00:00:00 || 2000-02-28 | 2000-02-28 00:00:00 | 2000-02-28 00:00:00 || 2000-02-29 | 2000-02-29 00:00:00 | 2000-02-29 00:00:00 |+------------+---------------------+---------------------+6 rows in set (0.00 sec)MysqL> show variables like 'read_only';+---------------+-------+| Variable_name | Value |+---------------+-------+| read_only     | ON    |+---------------+-------+1 row in set (0.00 sec)MysqL> create database new;query OK,1 row affected (0.03 sec)MysqL> use newDatabase changedMysqL> create table y2k (date DATE,time TIME);query OK,0 rows affected (0.80 sec)MysqL> select database();+------------+| database() |+------------+| new        |+------------+1 row in set (0.00 sec)MysqL> insert into new.y2k values ('2013-5-25','08:53:00');query OK,1 row affected (0.27 sec)MysqL> select * from new.y2k;+------------+----------+| date       | time     |+------------+----------+| 2013-05-25 | 08:53:00 |+------------+----------+1 row in set (0.00 sec)MysqL>

以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

总结

以上是内存溢出为你收集整理的MySQL里改read_only变量全部内容,希望文章能够帮你解决MySQL里改read_only变量所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1164299.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-01
下一篇 2022-06-01

发表评论

登录后才能评论

评论列表(0条)

保存