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

  • SEARCH
  • Home
  • 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 7033963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:07:41+00:00 2026-05-28T01:07:41+00:00

How can I enable the General Log for MySQL for use with MAMP ?

  • 0

How can I enable the General Log for MySQL for use with MAMP?

I use it to run Apache, MySQL and PHP on my Mac so I can turn on/off/restart via a UI instead of messing with Apache or PHP that’s installed in the machine by default.

On my Mac, I’ve tried setting config settings in the my.cnf file to log every SQL query that’s run to a file. The setting seems to have taken affect as shown by the output below when I run the SHOW VARIABLES command from within Terminal.

Problem: General Log file isn’t bring populated.
When I actually execute an SQL query or reload a PHP page on the MAMP server that reads data from the MySQL database, the general log file isn’t created or populated.

Here’s the part of content of my.cnf that I have set:

# The MySQL server
[mysqld]
#port       = 9999
socket      = /Applications/MAMP/tmp/mysql/mysql.sock
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
bind-address = 127.0.0.1
general_log = 1
general_log_file = /Applications/MAMP/logs/mysql_general_sql.log

Here’s part of the output from running SHOW VARIABLES statement:

mysql> show variables;
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| Variable_name                                     | Value                                                                                                                  |
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| ...                                               | ...                                                                                                                    |
| general_log                                       | ON                                                                                                                     |
| general_log_file                                  | /Applications/MAMP/logs/mysql_general_sql.log                                                                          |
| log                                               | ON                                                                                                                     |
| log_bin                                           | OFF                                                                                                                    |
| log_bin_trust_function_creators                   | OFF                                                                                                                    |
| log_error                                         | /Applications/MAMP/logs/mysql_error_log.err                                                                            |
| log_output                                        | FILE                                                                                                                   |
| log_queries_not_using_indexes                     | OFF                                                                                                                    |
| log_slave_updates                                 | OFF                                                                                                                    |
| log_slow_queries                                  | OFF                                                                                                                    |
| log_warnings                                      | 1                                                                                                                      |
| long_query_time                                   | 10.000000                                                                                                              |
| relay_log                                         |                                                                                                                        |
| relay_log_index                                   |                                                                                                                        |
| relay_log_info_file                               | relay-log.info                                                                                                         |
| relay_log_purge                                   | ON                                                                                                                     |
| relay_log_recovery                                | OFF                                                                                                                    |
| relay_log_space_limit                             | 0                                                                                                                      |
| report_host                                       |                                                                                                                        |
| report_password                                   |                                                                                                                        |
| report_port                                       | 3306                                                                                                                   |
| report_user                                       |                                                                                                                        |
| server_id                                         | 1                                                                                                                      |
| slow_launch_time                                  | 2                                                                                                                      |
| slow_query_log                                    | OFF                                                                                                                    |
| slow_query_log_file                               | /Library/Application Support/appsolute/MAMP PRO/db/mysql/tim-slow.log                                                  |
| socket                                            | /Applications/MAMP/tmp/mysql/mysql.sock                                                                                |
| sql_log_bin                                       | ON                                                                                                                     |
| sql_log_off                                       | OFF                                                                                                                    |
| ...                                               | ...                                                                                                                    |
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
318 rows in set (0.01 sec)

Is there something I’m missing?

  • 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-05-28T01:07:42+00:00Added an answer on May 28, 2026 at 1:07 am

    I tried running the command SET GLOBAL general_log = 'ON'; to see if I could get it to work that way. This produced an error message File Not Found, even though the file did exist.

    This indicated to me that problem may be due to file permissions.

    After some playing around, I changed:

    1. the owner of the file to match the user that the MySQL service was being run under, and
    2. gave that user “write access” to the file

    Since making those changes, it’s been working perfectly ever since.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a configuration file I want to enable myself to turn on and off
Can anyone offer any suggestions as to why wp-admin/options-general.php won't load on my Wordpress
Are there any general rules I can use for evaluating whether a modern compiler
I see that you can enable/disable using the EnableWindow method, but how do I
plz guide me how I can enable or disable asp.net validation controls using jQuery
I have a screen where you can enable/disable modules for my Android application. For
I'm looking for an add-in to VS2008 that can enable structural highlighting ( vertical
How can I enable mtrace() (and MALLOC_TRACE env) for a binary program without sources?
I am developing a RIA application with JavaScript in Eclipse. How can I enable
I can't get my GridView to enable a user to sort a column of

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.