DeveloperSide.NET Forums
December 13, 2019, 01:05:25 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to disable mysql binary logs?  (Read 23374 times)
0 Members and 1 Guest are viewing this topic.
TazDevilLooney
Customer, Basic Support
Jr. Member
*****
Posts: 30



View Profile
« on: May 13, 2010, 01:06:39 PM »

Hi,

Could anyone tell me how to disable mysql binary logs?
My file size has already reached 4.2GB and would like this disabled as im sure ill never need to use them.

Thankyou

Taz
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: May 13, 2010, 02:11:28 PM »

There are two ways to do this...

The direct way (to remove the logs)...
You would stop MySQL and simply delete all the mysql-bin.*** files EXCEPT for mysql-bin.index.
You would edit mysql-bin.index and clear it out of all entries (just delete everything in the file).

Then you can edit my.ini, comment out line (add # to the start):
log-bin=mysql-bin

...to prevent any future binary logs.


The other way (via mysql, to clear the logs)...

First stop the Apache Service so MySQL is not getting any queries sent to it.

Login to MySQL as root: from the command line 'mysql -u root -p', enter your password or the default 'rootwdp'.

Run the following two commands:
mysql> FLUSH LOGS;
mysql> RESET MASTER;

Depending on your log size, this might take a while and will reset and empty the logs.
« Last Edit: May 13, 2010, 03:03:07 PM by admin » Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
TazDevilLooney
Customer, Basic Support
Jr. Member
*****
Posts: 30



View Profile
« Reply #2 on: May 13, 2010, 04:23:41 PM »

Thankyou very much for the info. I'll give it a go.

Taz
Logged
TazDevilLooney
Customer, Basic Support
Jr. Member
*****
Posts: 30



View Profile
« Reply #3 on: May 14, 2010, 04:18:10 PM »

Excellent, just the job.

Thanks for the support.

TAZ 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!