Solved

Running drupal on MAMP gives max_allowed_packet error

Posted on 2012-03-19
4
663 Views
Last Modified: 2012-04-29
Am running drupal on MAMP (on a Macbook Pro using OSX 10.7.3).
Keep getting errors:

Cannot set variable `max_allowed_packet` to `536870912` in your database configuration!
Probably you do not have proper privileges on the database server.

I have created a my.cnf file in the MAMP/Library directory (a copy of my-medium.cnf.  The only change I have made in this is to comment out the line

log-bin=mysql-bin

to avoid multiple error messages like the above.   The max_allowed packet as defined in the file is the default value and not 536870912.

I have disabled the update status module as I understand this can cause this problem.

Can anyone help me to solve it?
0
Comment
Question by:bogorman
  • 3
4 Comments
 
LVL 6

Expert Comment

by:torakeshb
ID: 37740955
Please see whats the current max_allowed_packet in mysql

(1) Loging to mysql as root user
(2) Type the command " SHOW VARIABLES; "


"Probably you do not have proper privileges on the database server." --> direct to privilege issues.

Check whether you mysql DB location have proper privileges for the mysql service user.
0
 

Author Comment

by:bogorman
ID: 37741467
Am using MAMP on my Macbook Pro.  If I select the Variables tab it shows 1,048,576 as the value of max_allowed_packet.  Strange as the error shows 536870912.   I have searched in Finder for this value (either 536870912 or 512 (MByte equivalent) and I cannot find any file with these as settings for max_allowed_packet, so it looks as though it is not being set by any of the files on my disk.  In my.cnf it is set as 1M (under [mysqld] and 16M under [mysqldump] - the values in my-medium.cnf.

If I click the Privileges tab, a few minutes ago it showed two users, now it shows an additional two (user names in red):

User                 Host            Password           Global Privileges                            Grant

Any                    %               --                       USAGE                                            No
Any                  localhost      No                     USAGE                                            No
bogorman        localhost      No                     SELECT, INSERT, UPDATE, DELETE
                                                                      CREATE, DROP, INDEX, ALTER         No
root                 localhost      Yes                     ALL PRIVILEGES                              Yes
0
 

Accepted Solution

by:
bogorman earned 0 total points
ID: 37754006
Am still having this problem. Thought I'd solved it by reloading the privileges - it went away for a while but it has now returned.    Any further thoughts on this?
I am a bit confused about several users.   Do I need all these?   The only one with Grant=Yes is root.   Is this significant?
0
 

Author Closing Comment

by:bogorman
ID: 37907429
No one solved the problem.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question