3

In mysql data folder unknown files were created like this: enter image description here

This is my.ini content:

[client]
host= .
port= 3306
socket= "MySQL"

[mysql]
no-auto-rehash


[mysqld]

max_allowed_packet = 800M
thread_concurrency = 8
skip-external-locking
port=3306
basedir="c:/zpanel/bin/mysql/"
datadir="e:/hafez/bin/mysql/mysql5.5.24/data/"
character-set-server=utf8
default-storage-engine=MYISAM
max_connections=200
query_cache_size = 128M
table_cache=256
tmp_table_size=256M
thread_cache_size=8
myisam_max_sort_file_size=32G
myisam_sort_buffer_size=205M
key_buffer_size = 384M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size = 2M




innodb_fast_shutdown=0
innodb_additional_mem_pool_size = 16M
innodb_log_buffer_size = 8M
innodb_buffer_pool_size=1800MB
innodb_log_file_size = 256M
innodb_thread_concurrency = 16
innodb_lock_wait_timeout = 120
innodb_file_per_table 

innodb_doublewrite = 0
log-bin = 0
innodb_support_xa = 0
innodb_flush_log_at_trx_commit = 0


tmpdir= "e:/hafez/bin/mysql/mysql5.5.24/tmp/"

enable-named-pipe
skip-federated
server-id = 1

default-time-zone   = "SYSTEM"
log_error           = "c:/zpanel/logs/mysql/mysql.err"
pid_file            = "mysql.pid"
general_log         = 0
general_log_file    = "c:/zpanel/logs/mysql/mysql.log"
slow_query_log      = 0
slow_query_log_file = "c:/zpanel/logs/mysql/mysql-slow.log"


[myisamchk]
key_buffer_size = 1024M
sort_buffer_size = 1024M
read_buffer = 8M
write_buffer = 8M

[mysqldump]
quick
max_allowed_packet = 16M

[mysqlhotcopy]
interactive-timeout

I recently added some innodb tables and these files appeared!

These files are in root mysql data folder(e:/hafez/bin/mysql/mysql5.5.24/data) and aren't in any database folder.

What are these files?

Is it safe to delete this?

2 Answers 2

8

These are your binary logs. For some reason, your config file lists:

log-bin = 0

Did you mean by that to disable binary logs? Well, instead, you've simply named them as "0". Which is why you get all these files: 0.000001, 0.00002 etc.

If you want binary logging, better name them properly:

log-bin = mysql-bin

(this will make files named mysql-bin.000001, mysql-bin.000002 etc)

If you don't want binary logging, just comment the line:

#log-bin = mysql-bin

Typically, binary logs are desired: they are essential if you want to set up replication, or do logical point-in-time recovery.

If you do decide to disable them, and are convinced you do not need them, then you can also purge them:

mysql> PURGE MASTER LOGS TO '0.000025';

will delete all logs up to and excluding given log file.

1
  • I just answered this a minute ago in StackOverflow stackoverflow.com/q/17387299/491757. I'll +1 this anyway because it's the same reason. Actually, your answer is a little more careful because I did not consider if another MySQL instance was replicating from it. Commented Jun 30, 2013 at 5:40
1

Consider setting expire_logs_days = 14. This will toss the files after two weeks. However, if you have no use (eg, replication or backups) for binlogs, then turn it off. (See Shlomi's answer.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.