本站最近老发现打不开的情况,经查看阿里云,有被攻击迹象。
随后开启云盾。在云监控里面,添加CNAME。
而后查看硬盘,发现硬盘占用量高达%99,/var/lib/mysql占用了16G空间。
其中以mysql-bin-00000太过于臃肿。果断删除。
PS:bin文件主要用于主从复制。
清空mysql bin文件
[root@root ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.73-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> reset master;
Query OK, 0 rows affected (0.18 sec)
mysql>
而后,一切回归正常。
[root@Mark ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 20G 3.6G 16G 19% /
tmpfs 498M 0 498M 0% /dev/shm
[root@Mark ~]#
目前网站打开速度和上传速度正常。欢迎访问。