mysql - mysql_tzinfo_to_sql ORDER BY Error -


i need run utility mysql_tzinfo_to_sql project , whenever try run first command :

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql 

i following error:

error 1105 (hy000) @ line 46426: order ignored there user-defined clustered index in table 'time_zone_transition' 

my understanding because order by not processed won't go further in updating timezones, though have never touch base, not sure how can best solve issue.

also when trying run:

mysql_tzinfo_to_sql tz_file tz_name | mysql -u root -p mysql 

i following error:

mysql_tzinfo_to_sql: can't create/write file 'tz_file' (errcode: 2 "no such file or directory") problems zoneinfo file 'tz_file' 

edit: running on macos sierra (10.12.6) , trying because of that: https://docs.djangoproject.com/en/1.10/ref/databases/#mysql-time-zone-definitions

i have answer think should safe , should around error having. documentation, believe table time_zone_transition should empty default. so, think can try truncating table , removing indices:

delete time_zone_transition 

it sounds somehow there 1 or more indices on table causing problems. recommend removing indices:

show index time_zone_transition 

then following each index:

alter table time_zone_transition drop index some_index 

finally, try running initial command again:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql 

if still fails, same error, error trying fix not root cause of problem. then, have more work here.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -