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

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 -

1. Start MySQL Workbench and open your instance:


Start MySQL Workbench and open your instance

2. Open the Options File category


Open the Options File category

3. Open the 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 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 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:

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.0.3 Free Trial

RdpGuard protects:

Social Connection
RdpGuard Logo
People like RdpGuard!
Our Other Products
Windows Client for Amazon Glacier - new low-cost storage for data archiving and backup.
Copyright © 2012-2023 NetSDK Software. All rights reserved.  Terms of Use.  Privacy Policy.