[Maia-users] database issues

João Carmona jcarmona at interhost.pt
Thu Aug 30 12:22:27 PDT 2007


Kurt,

If that files are mysql logbin files, the best way to remove them is:

# mysql
> show master logs;

You should see a list, with all the files that you have /var/db/mysql
directory.

Now for delete them, using the mysql way do:

> purge master logs to 'mysql-bin.last' - replace "last", for the higher
number in the list.

Like Ryan said, if you are not using replication, disable the binary logging
in my.cnf.

Find and comment the lines like this:

#log-bin
#binlog-do-db=db  # input the database which should be replicated
#binlog-ignore-db=db # input the database that should be ignored for
replication
#server-id=number

Attention, because you can be using some more options. But the best is to
google a little bit.

Hope that help

Joao Carmona



> Well, I hope you have a word of advice here. I've done:
>
> ----------
>      mysqldump -Q --add-drop-table -u root -p maia /mnt/dump/maia.sql
>      mysql -u root -p
>           drop database maia;
>           quit;
>      /usr/local/etc/rc.d/mysql-server stop
> -----------
>
> After that, I took a look at /var/db/mysql, and still see 88 mysql-bin.*
> files in there with 57g worth of data. Should that have disappeared? I
> assume I can't just nuke them, because the other databases, namely
> information_schema, cluster, mysql, and test - correct?
>
> I then followed with
>
> ----------
>      /usr/local/etc/rc.d/mysql-server stop
>      mysql -u root -p
> ----------
>
> to start mysql back up again.
>
> "Now what?", is my plaintive cry.
>
> Kurt

Kurt,

I'm 99% sure you can just delete the mysql-bin.* files if you aren't doing
any database replication.  If I recall, I had the same problem as you and
almost ran out of disk space before realizing those files aren't even
really necessary.  In fact, you can also turn off binary logging in my.cnf
so those files don't get created anymore.  Google mysql-bin for more
details.

Regards,

Ryan

_______________________________________________
Maia-users mailing list
Maia-users at renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3807 bytes
Desc: not available
Url : http://www.renaissoft.com/pipermail/maia-users/attachments/20070830/d928a400/attachment.bin 


More information about the Maia-users mailing list