As a webmaster your daily job not only involves creating content and managing sites, you will also frequently run into all sorts of weird Apache or CMS errors. The latest Drupal error I ran into was the PDOException error, here’s how fix it

1. I Installed the Drupal administration views module so I could easily sort articles and nodes by author (Download link)

2. When sorting by author, I got the error PDOException, Mysql has gone away

3. I opened a shell terminal using Putty on Windows (or simply ssh into your server on Ubuntu or whatever OS you use)

4. Enter cd /etc

5. Enter pico my.cnf

6. Now copy and paste this code max_allowed_packet = 512M at the end

Sql Max Allowed Packet.png

7. Hit CTRL + O to write the file

8. Hit CTRL + E to exit the file

9. Enter service mysql restart

10. Wait and you should get a Success message – make sure to check for typos before restarting SQL

Restart Mysql Service.png

11. Done. Now test if this has fixed your error – if it hasn’t it’s possible you might have to change your SQL table to MyISAM (not InnoDB) or re-create your database

12. Post questions below