MariaDB Time Zone Data – Installing on MariaDB 10.0

centoslinuxmariadbMySQLtimezone

Yesterday, I set the time zone on our DB server (as explained here). Doing so required using the mysql_tzinfo_to_sql executable. Fortunately, this already existed on the server, and conversion of the time zone data went smoothly.

However, today I can see that our slave is generating the same error. The problem is that the slave doesn't seem to have the mysql_tzinfo_to_sql executable. apt-get tells me that it exists in these other packages:

root@slave:~# mysql_tzinfo_to_sql /usr/share/zoneinfo/|mysql -u root mysql
The program 'mysql_tzinfo_to_sql' can be found in the following packages:
 * mysql-server-5.5
 * mariadb-server-5.5
 * mysql-server-5.6
 * percona-xtradb-cluster-server-5.5
Try: apt-get install <selected package>

I'm concerned that installing one of these (probably would choose mariadb-server-5.5) would conflict with our currently-installed version of MariaDB (10.0.17-MariaDB-1~precise-log).

How should I go about installing this time zone data on the slave?

  • Can it be easily copied over from the master's DB?
  • Is my concern about installing mariadb-server-5.5 unwarranted?
  • Is there a totally different approach I'm missing?

Best Answer

I'm concerned that installing one of these (probably would choose mariadb-server-5.5) would conflict with our currently-installed version of MariaDB (10.0.17-MariaDB-1~precise-log).

Ubuntu Precise was released 12.04. It's super ridiculous old, and it was when you asked the question. That's why the version of MariaDB was so old too. MariaDB dropped support for precise in 10.0.31. Because you're running on an unofficial in Debian/Ubuntu's eyes version of MariaDB, it's not guaranteed to work with the system.

All of that said, the question is essentially who packaged your MariaDB. It seems likely you got it from MariaDB upstream. So while you have a workaround, the question is better phrased like this

  • Where does MariaDB install mysql_tzinfo_to_sql?

Clearly it's not in your path, you can find it by

  1. running the package you downloaded through dpkg -c.
  2. using apt-file
  3. Running: sudo updatedb; locate mysql_tzinfo_to_sql;