How to enable general logging for MySQL Server. MySQL General Query Log.
RdpGuard
Intrusion prevention system for your Windows Server
 
Follow:
Share:

MySQL General Query Log


MySQL General Query Log Overview

The general query log is a general record of what MySQL Server is doing. It writes information to this log when clients connect or disconnect, including failed login attempts which often indicate brute-force attempts.

RdpGuard uses general query log to detect failed login attempts to MySQL Server.

General Query Log is disabled by default and you need to enable it in order to detect and block brute-force attacks on your MySQL server. Below you will find detailed instructions on how to enable general logging.


To enable General Logging via MySQL Workbench

Below we will describe how to enable general logging via MySQL Workbench. If you do not have MySQL Workbench installed, you can download it from here - https://mysql.com/products/workbench/

1. Start MySQL Workbench and open your instance:

open-instance

Start MySQL Workbench and open your instance

2. Open the Options File category

choose-options-file

Open the Options File category

3. Open the Logging tab

logging-tab

Open the logging tab

4. Check the following checkboxes:

  • general-log
  • general_log_file
  • log-output (please also make sure it is set to FILE)

5. Click Apply to save changes.

click-apply

Click Apply to save changes

6. Close MySQL Workbench and restart RdpGuard Service


To enable General Logging via MySQL Config

1. Start your favorite text editor (or Notepad) and open my.ini (or my.cnf) file:

open-my-ini

Open MySQL config file in text editor

The most common path is %PROGRAMDATA%\MySQL\MySQL Server x.x\my.ini (where x.x is MySQL Server version). You can find more details about MySQL config file location here: https://dev.mysql.com/doc/refman/5.1/en/option-files.html

2. Scroll down the config file to the following lines:

my.ini file in text editor

MySQL Config file in text editor

Set general logging options as below:

  • log-output=FILE
  • general-log=1
  • general_log_file="general-log-filename.log"

3. Close the file and save changes.

4. Restart MySQL Server Service and RdpGuard Service.


See Also

How to enable and configure MySQL Brute-Force Protection

RdpGuard 9.4.5 Free Trial

RdpGuard protects:

Social Connection
RdpGuard Logo
 
People like RdpGuard!
Our customers say

"This sotware is really great. It's a relief. Because my server is constantly under attack. Thanks RdpGuard" - Joaquim De Sousa Marques

"Nice product. I used to implement something similiar in a low-tech and cumbersome manner via a script called TSBlock (not mine). This makes it much easier and is well worth the pricetag for SMB's." - J. Johnson

"Absolutely amazed at your product. We are a church in the North Dallas area, and I discovered this morning multiple failed logon attempts via our Remote Access Server. A friend suggested your product, so I immediately downloaded the trial. It had a list of about five blocked IP addresses in minutes, and that was enough to lead me to push the BUY button. Over the past 10-15 minutes the list is now about thirty with at least a third being international attempts to break into our system. Thanks for a great product. You may have just saved us much grief." - John Hallford

"Love the software. RDP on our Windows servers is just ridiculous. We would block it in the router but we have lots of old-time customers that would have issues." - Scott Hirsch

"Love the software! Makes it easier than tailoring VB Scripts!!" - Nick Brennan

"It's a great product - really stopping those RDP attackers :-)" - Dave, UK

"First of all: Your application is very (!!!) useful and I like it very much securing my 2012 R2 server. RdpGuard is the best solution, I found on the market and after 10 minutes of testing it I ordered the fully-featured version. :-)" - Carsten Baltes

Our Other Products
FastGlacier
Windows Client for Amazon Glacier - new low-cost storage for data archiving and backup.
Copyright © 2012-2024 NetSDK Software. All rights reserved.  Terms of Use.  Privacy Policy.