Skip to main content

Posts

Showing posts with the label timezone

MySQL Timezone support: Updating and Monitoring

How old is your timezone info? As the timezone database gets updated frequently, it's important to update the internal timezone database in MySQL. This is needed for the CONVERT_TZ() function for work properly. It's not easy to determine if the data in mysql is older than the data from the tzdata database. It get's a bit better if you use this hack before importing the zone database: ALTER TABLE mysql.time_zone_transition ADD COLUMN `Last_Update` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; I've created Bug #60675 to get the system database updated. Which database serves still need timezone info? Use MySQL Enterprise Monitor with custom rules . 1. Add data query Open /opt/mysql/enterprise/agent/share/mysql-monitor-agent/items/custom.xml in an editor and add this: <class> <namespace>mysql</namespace> <classname>tzdata_available</classname> <query><!--[CDATA[SELECT CONVERT_TZ(NOW(),'G...