WAMP服务器. MySQL中的数据目录很大吗? [英] WAMP server. Very large data directory in MySQL?

查看:71
本文介绍了WAMP服务器. MySQL中的数据目录很大吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的wammp服务器有问题. 在目录".. \ WampServer \ bin \ mysql \ mysql5.5.8 \ data"中创建了非常大的文件. 该目录的完整大小为50GB.这些文件是什么?我该如何解决这个问题?

I have problem with wammp server. In directory "..\WampServer\bin\mysql\mysql5.5.8\data" was created files with very large size. Full size of this directory is 50GB. What is these files? How can I fix this problem?

文件名是:

mysql-bin.000001
mysql-bin.000002
................
mysql-bin.000227

所有文件的大小为49GB

The size of all files is 49GB

提前谢谢!

推荐答案

默认情况下,每当对MySQL数据库进行更改时,它都会创建查询日志并将其存储在模拟文件中,并保存为mysql-bin.000001. MySQL数据库执行此操作,以便您可以恢复或复制数据库.在大多数应用程序中,启用此功能是一件好事,就像执行常规备份一样.

By default whenever you make a change to a MySQL database it creates a log of the query and stores it in a file simlare to mysql-bin.000001. The MySQL database does this so that you can recover or replicate a database. Most applications this is a good things to have enabled just like doing regular backups.

如果要禁止MySQL创建这些二进制日志:

If you want to disable MySQL from creating these binary logs:

  1. 打开my.ini
  2. 搜索此行log-bin=mysql-bin
  3. 通过添加井号标记此行:# log-bin=mysql-bin
  4. 保存并重新启动MySQL数据库
  1. Open my.ini
  2. Search for this line log-bin=mysql-bin
  3. Comment this line out by adding a hash mark: # log-bin=mysql-bin
  4. Save and restart the MySQL database

您现在可以安全地从该目录中删除这些文件.

You can now safely delete these files from that directory.

这篇关于WAMP服务器. MySQL中的数据目录很大吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆