Solved

Running drupal on MAMP gives max_allowed_packet error

Posted on 2012-03-19
4
649 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
No one solved the problem.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 count occurrences of each item in an array.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now