Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/88703-musql5-syntax-error/
Share on other sites

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".

Link to comment
https://forums.phpfreaks.com/topic/88703-musql5-syntax-error/#findComment-454474
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.