PDA

View Full Version : HUGE MySQL data files eating my HD!


kontrabass
Tue 7th Aug '01, 2:10pm
Well, I thought my forum was eating up all 7 gigs of my hard drive, but when I did a dump it's only 260MB.

THEN, I noticed like 8 files in /var/lib/mysql, which range in size from 900MB to 2 GIGS!! They are labled "myservername-bin.001, myservername-bin.002, etc.)

I opened some of the smaller ones, and they seem to be filled with half binary jumble and half data from my forum database (text from posts, announcements, etc.)

Is it safe to delete these files? What the heck are these things???

Thanks!!!

eva2000
Tue 7th Aug '01, 8:32pm
you should mysql logging off.. post your /etc/my.cnf file settings here

remove the line in your my.cnf file that says

# Start logging
log

kontrabass
Wed 8th Aug '01, 11:01am
Thanks! Freed up 5 gigs, and server loads seem to be much lower now with all the logging off.

eva2000
Wed 8th Aug '01, 2:29pm
Originally posted by kontrabass
Thanks! Freed up 5 gigs, and server loads seem to be much lower now with all the logging off. no probs :D

5 gigs :eek:

jon_pbn
Tue 14th Aug '01, 4:07pm
I didn't find those lines in my my.cnf
but i did find this line

log-bin


would that be the one to take out ?

eva2000
Tue 14th Aug '01, 4:08pm
Originally posted by jon_pbn
I didn't find those lines in my my.cnf
but i did find this line

log-bin


would that be the one to take out ? yup... you need to restart mysql after you take it out

jon_pbn
Tue 14th Aug '01, 4:11pm
is there some way to verify that loggging is now off after I restart the mysql server ?

eva2000
Tue 14th Aug '01, 4:15pm
run this in telnet as root user

mysqladmin variables

or mysqladmin -u root -p variables

should output something like .. look for log_bin OFF

ansi_mode OFF
back_log 50
basedir /
binlog_cache_size 32768
character_set latin1
character_sets latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5
concurrent_insert ON
connect_timeout 5
datadir /home/mysql/
delay_key_write ON
delayed_insert_limit 100
delayed_insert_timeout 300
delayed_queue_size 1000
flush OFF
flush_time 0
have_bdb NO
have_gemini NO
have_innodb NO
have_isam YES
have_raid NO
have_ssl NO
init_file
interactive_timeout 28800
join_buffer_size 3141632
key_buffer_size 16773120
language /usr/share/mysql/english/
large_files_support ON
locked_in_memory OFF
log OFF
log_update OFF
log_bin OFF
log_slave_updates OFF
long_query_time 10
low_priority_updates OFF
lower_case_table_names 0
max_allowed_packet 1048576
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connections 150
max_connect_errors 10
max_delayed_threads 20
max_heap_table_size 16777216
max_join_size 4294967295
max_sort_length 1024
max_user_connections 0
max_tmp_tables 32
max_write_lock_count 4294967295
myisam_recover_options OFF
myisam_max_extra_sort_file_size 256
myisam_max_sort_file_size 2047
myisam_sort_buffer_size 8388608
net_buffer_length 16384
net_read_timeout 30
net_retry_count 10
net_write_timeout 60
open_files_limit 0
pid_file /home/mysql/www.fileshosts.com.pid
port 3306
protocol_version 10
record_buffer 3141632
query_buffer_size 0
safe_show_database OFF
server_id 0
skip_locking ON
skip_networking OFF
skip_show_database OFF
slow_launch_time 2
socket /var/lib/mysql/mysql.sock
sort_buffer 6291448
table_cache 1024
table_type MYISAM
thread_cache_size 64
thread_stack 65536
transaction_isolation READ-COMMITTED
timezone CDT
tmp_table_size 1048576
tmpdir /tmp/
version 3.23.37
wait_timeout 28800