jimath Posted January 31, 2008 Share Posted January 31, 2008 hello everyone! i am using mysql 5 and when i run these commands, the following errors occuring: 1 . SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; You have an error in your SQL syntax. 2. CREATE DATABASE `health` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; #1064 - 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 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1 can anyone help? Quote Link to comment Share on other sites More sharing options...
revraz Posted January 31, 2008 Share Posted January 31, 2008 For #2, try removing the back ticks from health. If that doesn't work, try using double quotes around health. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 31, 2008 Share Posted January 31, 2008 For #2, try removing the back ticks from health. If that doesn't work, try using double quotes around health. It's not a reserved keyword, so backticks won't make a difference. And double quotes are never valid syntax for name. AFAIK, it's either DEFAULT or a specified charset/collation, not both. Try dropping "DEFAULT". Quote Link to comment Share on other sites More sharing options...
jimath Posted January 31, 2008 Author Share Posted January 31, 2008 i tried to remove DEFAULT but ..nothing. There is no difference with double or no quotes. Anything else? Quote Link to comment Share on other sites More sharing options...
fenway Posted January 31, 2008 Share Posted January 31, 2008 According to the refman page, you should have no problems... Quote Link to comment Share on other sites More sharing options...
Illusion Posted February 1, 2008 Share Posted February 1, 2008 Try 1 . SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'; 2. CREATE DATABASE health DEFAULT CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' ; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.