This is a discussion on "error in SQL syntax" within the Databases section. This forum, and the thread "error in SQL syntax are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
error in SQL syntax
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hello everyone
I am trying to make a database in MySqlManager. But it just says this: 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 ''TEST_DB'' at line 1 What does this mean? Is the Query ok? Please Help Thanks |
|
|
|
#2
|
|||
|
|||
|
Re: error in SQL syntax
Have any of you got any ideas?
|
|
#3
|
|||
|
|||
|
Re: error in SQL syntax
Just a guess here, but I think it means you have an error in your syntax.
How would we know? |
|
#4
|
|||
|
|||
|
Re: error in SQL syntax
Quote:
|
|
#5
|
|||
|
|||
|
Re: error in SQL syntax
What you wrote and how you wrote it. Something like:
|
|
#6
|
|||
|
|||
|
Re: error in SQL syntax
Quote:
CREATE DATABASE 'TEST_DB' i used phpmyadmin Last edited by Drgreenfingers; Feb 1st, 2006 at 19:03. |
|
#7
|
|||
|
|||
|
Re: error in SQL syntax
Your error is a simple one you used ' instead of `
|
|
#8
|
|||
|
|||
|
Re: error in SQL syntax
Quote:
1044 - Access denied for user ''@'localhost' to database 'test_db' Last edited by Drgreenfingers; Feb 1st, 2006 at 19:02. |
|
#9
|
|||
|
|||
|
Re: error in SQL syntax
drgreenfingers, see the personal note I sent to you via posting in the forums.
As to your question, do you have proper permissions to create database with that user? Did you set up mysql on your own machine? If so did you set up proper user permissions? |
|
#10
|
|||
|
|||
|
Re: error in SQL syntax
Quote:
so how do you set up permissions? |
|
#11
|
|||
|
|||
|
Re: error in SQL syntax
Look in the mysql manual on using GRANT permissions to set up a user. If the user does not have permissions to create tables or databases you won't be able to do anything with that user.
Is this on your own machine or a hosted machine? If on your own machine are you connecting as ROOT to mysql or are you connecting as a regular user? |
![]() |
| Tags |
| error, sql, syntax |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] error in SQL syntax but where it all looks fine to me | Andrew1986 | Databases | 3 | Nov 28th, 2007 01:21 |
| Syntax error with Ajax file reading | Paramiliar | JavaScript Forum | 0 | Aug 12th, 2007 16:48 |
| syntax error... | ktsirig | Databases | 2 | Feb 4th, 2007 14:48 |
| Annoying little syntax error | adeking | Web Page Design | 4 | Aug 9th, 2006 13:50 |
| syntax error: unexpected T_BOOLEAN_AND... | jswebdev | PHP Forum | 4 | Jan 28th, 2006 07:29 |