This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229462 - error code 1064, sql state 42000
Summary: error code 1064, sql state 42000
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: MySQL (show other bugs)
Version: 7.3
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-07 13:05 UTC by beeh56
Modified: 2013-05-10 16:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (542.24 KB, text/plain)
2013-05-07 13:06 UTC, beeh56
Details

Note You need to log in before you can comment on or make changes to this bug.
Description beeh56 2013-05-07 13:05:50 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Windows 8 version 6.2 running on x86
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) Client VM 23.21-b01
Comment 1 beeh56 2013-05-07 13:06:43 UTC
Created attachment 134186 [details]
IDE log
Comment 2 Marian Mirilovic 2013-05-09 08:20:32 UTC
There are couple exceptions in your log file :
java.sql.SQLException: Access denied for user 'root'@'localhost' ...
...
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; ...

Any steps to reproduce ?
Comment 3 beeh56 2013-05-09 10:19:43 UTC
I see that you have commented, but someone just learning to use this IDE, I am lost.  I am following an examples in the book and continue to get these errors. 

You have stated the obvious on the errors but not how to fix them.
Comment 4 matthias42 2013-05-10 16:28:30 UTC
I'll try to deduce from the information, that was provided:

1. You executed this SQL:

CREATE TABLE 'status' (
'id' bigint(20) NOT NULL AUTO_INCREMENT,
'name' varchar(50) NOT NULL, 
'image' varchar(100) NOT NULL, 
'status' varchar(500) NOT NULL,
'timestamp' int(11) unsigned NOT NULL, 
PRIMARY KEY ('id')
) ENGINE=MyISAM DEFAULT CHARSET=utf8

2. You got this error message displayed:

Error code 1064, SQL state 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 ''status' (
'id' bigint(20) NOT NULL AUTO_INCREMENT,
'name' varchar(50) NOT NULL,' at line 1
Line 1, column 1

Explanation: Your SQL is wrong! It's not a bug in the IDE, but in your code.

Try this:

CREATE TABLE `status` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL, 
`image` varchar(100) NOT NULL, 
`status` varchar(500) NOT NULL,
`timestamp` int(11) unsigned NOT NULL, 
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8

You quoted the identifiers as strings, not as identifiers.

The other errors look like failed authentication attempts.