Running drupal on MAMP gives max_allowed_packet error

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?
bogormanAsked:
Who is Participating?
 
bogormanConnect With a Mentor Author Commented:
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
 
torakeshbCommented:
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
 
bogormanAuthor Commented:
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
 
bogormanAuthor Commented:
No one solved the problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.