MySQL

Stop MySQL giving up on Drupal

With Drupal, if you have a content type with lots of records you can run into a problem where you start getting lots of "server has gone away" errors from MySQL. This stems from queries getting too long and MySQL giving up before the query has finished loading. So, to fix it, just edit your my.ini or my.cnf file to add the following line to the [mysqld] section:

  • max_allowed_packet=24M

There are other settings that can make a difference too, but this seems to be a good starting point.

Tags: 

Rails on OSX tip: MySQL access

After wasting lots of time trying to get a database connecting to Rails on my MacPro at work I finally found the magic combination for MySQL.

  • Install MySQL.
  • Install the MySQL GUI Tools set.
  • Using the MySQL Administrator from the GUI Tools add a new user.
  • When adding permissions for the use set the hostname to be "(computername).local", e.g. "mymac.local".

It is that last part that had me pulling my hair out - using just "%" didn't work for me, it had to be "(computername).local". Silly thing.

Tags: 

MySQL + Rails on Cygwin tip

Here's a really quick tip for anyone using Rails on Cygwin. If you want to connect to a MySQL database the understood practice is to compile MySQL and go through the hassle of getting it all working within Cygwin itself. After what I've gone through with it all, the best way of getting this combination to work is to:

Tags: 

Subscribe to MySQL