What does data folder of a company consists of?

310    Asked by dipesh_9001 in SQL Server , Asked on Mar 13, 2023

In mysql data folder unknown files were created like this:

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 the 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?

Answered by David Edmunds

Regarding the data folder of a company consists of, these are your binary logs. For some reason, your config file lists:


log-bin = 0
Did you mean 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 the given log file.



Your Answer

Interviews

Parent Categories