呵呵呵呵呵

萝莉有三好,柔体 轻音 易推倒。女神有三宝,干嘛 呵呵 去洗澡。宅男有三好:Dota 基友 破电脑。


mysql-bin.0000格式文件说明

mysql-bin.0000 files是mysql的日志文件,在数据量大的时候占用很大的磁盘空间,如何删除呢,修改mysql的配置文件,让它不用自动生成日志文件,在my.conf或者my.ini中查找log-bin=mysql-bin将该行注释掉,然后然后启动mysql,同时可以删除掉相关的mysql-bin.0000格式文件。

If your MySQL data directory has many files such as:

mysql-bin.000001
mysql-bin.000002
etc..



that means that the [mysqld] option:

log-bin=mysql-bin

is enabled in your /etc/my.cnf (or in the startup script).

The solution to prevent those files from being created is to comment out the log-bin option from the my.cnf.
The internal default is "OFF", hence removing it will disable it.

You can delete your mysql-bin.0* files after mysqld has been restarted.

当然如果你必须要有日志文件,你还可以有另一种方法,就是设置为一定时间后自动删除,如下所说,使用expire_logs_days=X,其中X为天数。

There are two ways to fix this problem:

The first is to stop the MySQL server from creating these binary files. The only reason you would need the binary log files is if you are doing mysql replication from a master to a slave. In this case, these files are necessary, at least until the slave(s) has caught up with the master. To stop this from logging, comment out (using #) the line containing ‘log-bin’.

The second is to continue logging – this is necessary as stated above if you are performing SQL replication.

You can add a line to your /etc/my.cnf file which will only keep these files around as long as necessary. The line is:

1
expire_logs_days = X

Where X is the number of days you’d like to keep them around. I would recommend 10, but this depends on how busy your MySQL server is and how fast these log files grow. Just make sure it is longer than the slowest slave takes to replicate the data from your master.

更多内容:

使用wireshark抓取127.0.0.1的流量
解决无法定位程序输入点@Idwinsock@initialization$qqrv于动态链接库 indy60.bpl上
彻底解决BCB6中Unable to open file INDY60.LIB错误
预编译#pragma hdrstop 作用
bcb6生成动态库dll

本文链接地址:http://www.hehehehehe.cn/i/23.html