Jump to content
Larry Ullman's Book Forums

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...