0
CREATE DATABASE 'hello' ;

19:40:38 CREATE DATABASE 'hello' Error Code: 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 ''hello'' at line 1

I installed mysql with default settings and I don't know if it has anything to do with the settings.

Can someone tell me how to fix this error?

4
  • 4
    'hello' is a string literal. Identifiers are not quoted in SQL. Details are in the manual: dev.mysql.com/doc/refman/5.5/en/identifiers.html Commented Nov 18, 2014 at 14:21
  • 1
    Correct, try CREATE DATABASE hello; Commented Nov 18, 2014 at 14:22
  • If you must quote the database name, then use back ticks ` Commented Nov 18, 2014 at 14:24
  • Oh that was a silly question.What a noob Im. Commented Nov 18, 2014 at 14:41

2 Answers 2

1

Basic syntax of CREATE DATABASE statement is as follows:

        CREATE DATABASE DatabaseName;

Try Like Below...

        CREATE DATABASE hello;
Sign up to request clarification or add additional context in comments.

Comments

0

Use like this;

 CREATE DATABASE hello;

http://dev.mysql.com/doc/refman/5.0/en/create-database.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.