User login


MySQL Query to Get Quick Overview of Nodes by Content Type

mysql> SELECT, nt.type, COUNT(n.nid) FROM node_type nt LEFT JOIN node n ON nt.type = n.type GROUP BY (nt.type);

Gotcha: drush sql-sync does not drop existing tables

When you run drush sql-sync you do not have exactly what is on your example production site. Tables that do not exist on production but do exist on your local development site will still exist.

You need to drop all tables in the database, or simply drop and re-create the database, first.

Error 28: The out of disk space MySQL error

user warning: Got error 28 from storage engine query

what partition is my mysql on

free disk space debian partitions

"Got error 28 from storage engine query" error

Keeping track of disk space

delete log files...

Making Drupal nids into edit link from your command-line SQL

I wanted to call this post "automating manual changes" but it's hard to get across the meaning of automating parts of the process that keep it manual.

Stolen directly from Growing Ventures Solutions post on migrating a messy Drupal 5 site to D6. (Primarily this post provides you with copyable text where there's had an image.)

Stop phpMyAdmin from logging you out in your own local environment (Ubuntu)

vi /etc/phpmyadmin/

You may need to use sudo; vim will warn you if you try editing a read-only file.

Edit an existing LoginCookieValidity setting if any, or (as in our case) add the following to the bottom of the file.

(Note that in vim you can search with /LoginCookieValidity and, if finding nothing, go to the end of the file with :999 -- actually that's go to line 999 which is just as good in this case, there's a command to do it for real too). Then you can press i to insert text:

Switch to a working theme via the database after deleting a theme leads to WSOD

OK, maybe there are other situations where this can come up but in this case my esteemed colleague deleted the only enabled theme. This resulted in a White Screen Of Death (WSOD). A database fix was about as fast and more what was wanted (the deletion was intentional, just not the WSOD) than rolling back to a version with that theme (called mydeadtheme here to protect the innocent).

From the command line on your test server or local development environment:

When naming projects that will spawn a database, be mindful of 16 character limit

Stefan has set up fantastic tools using Git and Capistrano and Rake to rapidly set up Drupal projects for Agaric. This documentation, private on, will be generalized and made public once we've worked out more bugs in the system.

This post isn't about this system specifically so much as a general caution.

If you have any setup to aid your deployment that automatically makes a database or user based on your project name, you have to be aware of MySQL's 16 character limit and do something to address this before the errors.

Looking at SQL to fix broken queries in a Drupal environment

Alternate title: Apparently I don't understand SQL (and so need all the help I can get)

The easiest way to get a better look at your SQL in Drupal is to install the devel module. (Hint: It's for use on development sites, not production sites!)

Syndicate content