Skip to content

Instantly share code, notes, and snippets.

@CptLemming
Last active August 29, 2015 14:17
Show Gist options
  • Save CptLemming/d28acd9382bd677dcc0e to your computer and use it in GitHub Desktop.
Save CptLemming/d28acd9382bd677dcc0e to your computer and use it in GitHub Desktop.
MacOSX mysql_tzinfo_to_sql workaround
# https://bugs.mysql.com/bug.php?id=68861
# mysql_tzinfo_to_sql creates bad data
mysql_tzinfo_to_sql /usr/share/zoneinfo > /tmp/bad_tzinfo.sql
echo "SET SESSION SQL_MODE = '';" > /tmp/mysql_tzinfo_to.sql
cat /tmp/bad_tzinfo.sql >> /tmp/mysql_tzinfo_to.sql
mysql -uroot mysql < /tmp/mysql_tzinfo_to.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment