[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Running drupal on MAMP gives max_allowed_packet error

Posted on 2012-03-19
4
Medium Priority
?
680 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 7

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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …
Suggested Courses

649 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