WordPress mysql query to dump all categories (id, slug, name, description, count)
SELECT wp_terms.term_id, wp_terms.slug, wp_terms.name, wp_term_taxonomy.description, wp_term_taxonomy.count FROM wp_term_taxonomy join wp_terms on (wp_term_taxonomy.term_id = wp_terms.term_id) WHERE wp_term_taxonomy.taxonomy = 'category'