PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 14, 2022

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

 February 14, 2022     drupal-7, macos, mamp, mysql     No comments   

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
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing