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?
  • what operating system are you using? Oct 26, 2017 at 17:30
  • CentOS... 7, I think?
    – rinogo
    Oct 26, 2017 at 17:32
  • No, I think you were on Ubuntu Precise. Lol Oct 26, 2017 at 17:32
  • Ah, I just re-read the question (it has been a while... :) ) Yes, this was on our slave, so likely Ubuntu. Not Precise, but something recent-ish.
    – rinogo
    Oct 26, 2017 at 17:35

2 Answers 2


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;
  • 1
    Thank you! Busy working on other things right now, but if this pops up again, I'll give it a go! :)
    – rinogo
    Oct 26, 2017 at 17:39

I figured out a solution. The key to this solution is that I already had a system (the master) that I knew I could generate the timezone SQL on. I simply generated the SQL on the master, transferred it to the slave, and executed it!

On Master

user@master [~]# mysql_tzinfo_to_sql /usr/share/zoneinfo/ > timezones.sql

On Slave

root@slave:~# scp -P2223 user@master:timezones.sql .
user@master's password: 
stdin: is not a tty
timezones.sql                                                                                                                                   100% 4562KB   2.2MB/s   00:02    
root@slave:~# cat timezones.sql | mysql -u root mysql

After executing START SLAVE on the slave, everything worked great!

Still curious if someone has answers to the questions I posed originally, though!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.