skincr Posted February 13, 2013 Share Posted February 13, 2013 Hi, I hope someone can help me, i am going crazy. I am trying to populate the time zone tables, but everytime i try i get the same error message: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near './mysql_tzinfo_to_sql /usr/share/zoneinfo | /Applications/MAMP/Library/bin/mysql' at line 1 Now, i had read the MySQL manual several times, and tried: mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql; somebody suggested using this variation since i am using MAMP:./mysql_tzinfo_to_sql /usr/share/zoneinfo | /Applications/MAMP/Library/bin/mysql -p -u root mysql; or this one: ./mysql_tzinfo_to_sql /usr/share/zoneinfo | ./mysql -p -u root mysql i get the same ERROR 1064 message. I had check the path to the folders and i am sure is correct, AM I MISSING SOMETHING? Thanks in advance for any help MySQL version 5.5.9 Mac 10.5.8 Link to comment Share on other sites More sharing options...
Larry Posted February 13, 2013 Share Posted February 13, 2013 I may have seen this myself. If so, the solution may have been to remove the /usr/share/zoneinfo/+VERSION file and then try running that command again. Link to comment Share on other sites More sharing options...
skincr Posted February 14, 2013 Author Share Posted February 14, 2013 I did read your post on that and followed your advice by removing the +VERSION file, before i asked for help. Still nothing happened. I think my problem is i have zend framework on my computer, Zend have a copy of MySQL on their package, of course that copy of Mysql have a Mysql database with time_zone tables on it. Do you think that could be the reason of the conflict?? By the way thank you for the help. Link to comment Share on other sites More sharing options...
Larry Posted February 14, 2013 Share Posted February 14, 2013 Actually, reading more clearly, are you entering that command from within the mysql client? Because you should be doing it just from the command prompt for the operating system. Link to comment Share on other sites More sharing options...
skincr Posted February 14, 2013 Author Share Posted February 14, 2013 Yes i was doing it from the command prompt. What i just did is: got a copy of the time_zone .frm .MYD .MYI files fully populated and manually replaced the files from /Applications/MAMP/db/mysql/mysql Completely unortodox but when i run 'SELECT COUNT(*) FROM mysql.time_zone_name; ' as a test, i get " COUNT(*)546 " , so it seems that the trick worked. Link to comment Share on other sites More sharing options...
Larry Posted February 15, 2013 Share Posted February 15, 2013 Unconventional, but that will work. Kudos for figuring it out and thanks for sharing. Link to comment Share on other sites More sharing options...
Recommended Posts