不用代码框括起来了,直接就是文本吧,#的行是注释
下面的是真实的例子,可供参考:

[ root@aslibra www.aslibra.com ]# mysql -S /Data/www.aslibra.com/mysql/mysql.sock -uadmin -ppassword
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 322891
Server version: 5.5.2-m2-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

#显示当前所有日志
mysql> show master logs;
+------------------+------------+
| Log_name         | File_size  |
+------------------+------------+
| mysql-bin.000001 |        126 |
| mysql-bin.000002 | 1074328576 |
| mysql-bin.000003 |  918443740 |
| mysql-bin.000004 |        126 |
| mysql-bin.000005 |        126 |
| mysql-bin.000006 |  109880744 |
+------------------+------------+
6 rows in set (0.00 sec)

#删除日志到某一个,不能超过最后一个
mysql> purge master logs to 'mysql-bin.000027';
ERROR 1373 (HY000): Target log not found in binlog index

#删除日志到最后一个即可
mysql> purge master logs to 'mysql-bin.000006';
Query OK, 0 rows affected (3.80 sec)

#看看现在的情况
mysql> show master logs;
+------------------+-----------+
| Log_name         | File_size |
+------------------+-----------+
| mysql-bin.000006 | 109884395 |
+------------------+-----------+
1 row in set (0.00 sec)

#退出
mysql> exit


原创内容如转载请注明:来自 阿权的书房
收藏本文到网摘
Tags:
发表评论
AD
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML 打开UBB 打开表情 隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写
 

阅读推荐

服务器相关推荐

开发相关推荐

应用软件推荐