Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8470755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:36:31+00:00 2026-06-10T16:36:31+00:00

Logging enabled I enabled logging using : SET GLOBAL log_output = ‘TABLE’; SET GLOBAL

  • 0

Logging enabled

I enabled logging using:

SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';

All executed queries was logging to mysql.general_log table. It is fine.

Attempt to clear the table

Then the table became large and I wanted to delete all records from the table. I executed:

DELETE FROM general_log

But this caused to an error that says I cannot lock log tables. So, I dropped the table after disabling logging:

SET GLOBAL general_log = 'OFF';
DROP TABLE general_log;

I hope that enabling logging again will create the table, but I couldn’t enable it. When I execute this:

SET GLOBAL general_log = 'ON';

It gives this error:

Table ‘mysql.general_log’ doesn’t exist

Questions

  1. How to create mysql.general_log again?
  2. How to clear mysql.general_log safely and in a painless way?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:36:32+00:00Added an answer on June 10, 2026 at 4:36 pm

    Recreate:

    USE mysql;
    
    CREATE TABLE IF NOT EXISTS `general_log` (
      `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      `user_host` mediumtext NOT NULL,
      `thread_id` int(11) NOT NULL,
      `server_id` int(10) unsigned NOT NULL,
      `command_type` varchar(64) NOT NULL,
      `argument` mediumtext NOT NULL
    ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
    

    Clear table:

    TRUNCATE table mysql.general_log;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get logging enabled on my application using Fluent NHibernate and log4net.
I have a database with LDAP login enabled. It works fine when logging in
I am building an application using Javamail. For logging purposes, I set: properties.put(mail.debug, true);
I have a spring app with aop enabled using cglib proxies for logging: <?xml
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
http://logging.apache.org/log4net/release/config-examples.html Given the log table here: CREATE TABLE [dbo].[Log] ( [Id] [int] IDENTITY (1,
I'm using HAProxy 1.4.22. I have the following haproxy.conf file: global maxconn 100000 daemon
I'm trying to set up a basic hello world project using Eclipse Indigo and
I'm using the org.jboss.logging.Logger class, and seem to have come across an incongruity. When
I'm debugging some code that was written using java.net.HttpURLConnection . I'd like to set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.