tags:

views:

11

answers:

2

I'd like to populate the mysql timezone tables with the database provided by mysql. I am using a cloud DB and can't overwrite DB tables and restart the server. Can someone help me understand how to load these files manually?

Rational: I loaded the tz tables from the OS, but the OS has a ton of timezone names. I'd like a more concise set of names that I can query for forms. I think the set provided by mysql might be a better fit. No other apps are running on the DB, thus tz conflicts aren't an issue.

A: 

The database provided by mysql comes as a bunch of myISAM container files; I don't think you're going to be able to safely drop them into the mysql data base directory without bouncing your mysqld.

Do you own this mysqld, or are you one of many tenants in a vendor-owned system?

If you own it, you can load a subset of the /usr/share/zoneinfo time zones. A useful subset might be /usr/share/zoneinfo/posix.

If you're using the mysql.time_zone_name.Name to populate a pick list (a good use for it) you could select an appropriate subset of the admittedly enormous list of names, or create some aliases right in that table.

Ollie Jones
A: 

I ended up loading the tables into a SQL server on my on local machine, then exporting insert statements and manually loading those onto the server for which I don't have direct control of. Not a glamors solution, it it appears to be the only reasonable way to go about it.

David Parks