Monday, February 14, 2022

[FIXED] MAMP - Importing Drupal database - [#2006 - MySQL server has gone away]

Issue

OS10.10 - MAMP 3.0.7.2 - phpMyAdmin 4.2.10 - Drupal 7

Every time I try to import a SQL database while in phpMyAdmin I get an error

#2006 - MySQL server has gone away 

Tried even exporting a fresh Drupal database from phpMyAdmin and then importing it into a blank database but I receive the same error.

I Googled around a bit and found it was a good idea to up my max_allowed_packet to 16M. Did so but still nothing.

2 Questions:

1) How can I even check if this new my.cnf is being loaded in my MAMP? (anything in Terminal that I can use? Like how you can use php --ini for finding the loaded php file. )

2) Is this indeed an issue with the max_allowed_packet or something else entirely?


Solution

Interesting. Did a sudo find / -name "my.cnf" in terminal and found one located /Applications/MAMP_2014-10-24_15-43-56/conf/my.cnf. Removed this, and now I can import my databases just fine.

So #2 is answered.

If anyone knows an answer for #1 that would be great. Seems MAMP is good as reading the my.cnf placed inside /Applications/MAMP/Library/ as long as there are no other located else where in MAMP. But it would be neat if there was a quick way to 100% find out what .cnf file is being loaded.



Answered By - Josh

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.