SELECT allhours.h, IFNULL(mytablehours.c, 0)
FROM (SELECT '01' AS h UNION SELECT '02' UNION SELECT '03' UNION SELECT '04'
UNION SELECT '05' UNION SELECT '06' UNION SELECT '07' UNION SELECT '08'
UNION SELECT '09' UNION SELECT '10' UNION SELECT '11' UNION SELECT '12'
UNION SELECT '13' UNION SELECT '14' UNION SELECT '15' UNION SELECT '16'
UNION SELECT '17' UNION SELECT '18' UNION SELECT '19' UNION SELECT '20'
UNION SELECT '21' UNION SELECT '22' UNION SELECT '23' UNION SELECT '00')
as allhours
LEFT JOIN (SELECT HOUR(mytable.date) as h, COUNT(mytable.date) as c
FROM mytable
WHERE DATE(mytable.date) = CURDATE()
GROUP BY HOUR(mytable.date))
as mytablehours on mytablehours.h = allhours.h
$string = iconv('utf-8', 'cp1251', $string);
$string = iconv('cp1252', 'utf-8', $string);
InnoDB adds three fields to each row stored in the database. A 6-byte DB_TRX_ID field indicates the transaction identifier for the last transaction that inserted or updated the row. Also, a deletion is treated internally as an update where a special bit in the row is set to mark it as deleted.
Each row also contains a 7-byte DB_ROLL_PTR field called the roll pointer. The roll pointer points to an undo log record written to the rollback segment. If the row was updated the undo log record contains the information necessary to rebuild the content of the row before it was updated.
A 6-byte DB_ROW_ID field contains a row ID that increases monotonically as new rows are inserted. If InnoDB generates a clustered index automatically, the index contains row ID values. Otherwise, the DB_ROW_ID column does not appear in any index.
Есть пошаговая инструкция по сборке MySQL в Linux: "Installing MySQL Using a Standard Source Distribution". Для отладочной версии MySQL надо на 6-ом шаге вместо команды./configure --prefix=/usr/local/mysql
Воспользоваться командой из статьи "Компиляция MySQL для отладки".
Только остаётся один вопрос: если вы не смогли самостоятельно разобраться/нагуглить как компилировать MySQL, то зачем вам debug версия этой БД?
mysql - это клиент, который подключается к серверу. а mysqld вообще запущен? ps -ef | grep mysqld - проверка.