Solving Drupal error: PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

The problem After downloading a Drupal project I am working on, and importing its database I got this kind of message related with a PDO Exception: Additional uncaught exception thrown while handling exception. PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid…

CakePHP Database connection “Mysql” is missing, or could not be created in CakePHP Console SOLVED

Today, I spent some time helping a partner of mine trying to figure out how to enable and use the CakePHP console in Mac OS + XAMPP (Mac OS version of course), so, after searching on the internet what was going on, I realized there was a problem with the unix_socket for MySQL because Mac…

How to create custom functions on MySQL 5.x

An excellent feature that you could use in MySQL is the posibility of adding custom function and stored procedures. In this article I will explain how to create your own custom functions on MySQL, stored procedures are explained in another post. A stored procedure is a subroutine available to applications that access a relational database…