Install MySQL Time Zone Support on MAMP Pro

To setup the ability to use time zone features in MySQL like CONVERT_TZ(), for example, you need to setup time zone support in your MySQL install.  These steps are specifically for MAMP Pro, but will work for any install as long as you change the paths appropriately.

  1. Open Terminal
  2. Run the following command…
    /Applications/MAMP/Library/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ |/Applications/MAMP/Library/bin/mysql -u root -p mysql

    If you have already updated your command line services per MAMP Pro Setup then you can simply run…

    mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -u root -p mysql
  3. When prompted, enter your MySQL root password
  4. Restart MySQL

You can also refer to the official documentation… 10.6 MySQL Server Time Zone Support.

One thought on “Install MySQL Time Zone Support on MAMP Pro

Leave a Reply

Your email address will not be published. Required fields are marked *