Error in SQL syntax in NetBeans using MySQL

I am running the NetBeans eCommerce tutorial and I am facing the following problem.

Here is the section. I am specifically on the step of adding sample data to the database . When I execute this trivial command: select * from category; I get an error

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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
Line 1, column 1

      

None of the values ​​for this selection are displayed, even though the table is not empty.

I am executing this command in NetBeans IDE 7.3 RC2 inside the Database Explorer module using the Execute Command.

I was thinking if the problem might not be the encoding I am using in my database. I used utf8 - utf8_unicode_ci, then I changed it to the default utf8 setting, but there was no change.

I am using MySQL 5.6.10 and running it through MySQL Workbench.

Thanks a lot for your answers :)

EDIT AND PARTIAL SOLUTION: To complete my answer and answer in part. I don't know why the SQL script editor in netbeans is not working. But finally I successfully created the connection pool and datasource. All requests made with datasource on JSP pages work fine.

+3


source to share


3 answers


It looks like the netbeans connector was using a deprecated command that was removed in MySQL 5.6. Found this discussion, they seem to have found the answer:



http://netbeans.org/bugzilla/show_bug.cgi?id=224260

+3


source


This is a mysql driver error. In netbeans, change the jar of your mysql driver with the latest version. For example, with mysql-connector-java-5.1.24, the View Data command in NetBeans works fine.



+3


source


netbeans calculates the field differently in mysql cmd if you type this syntax insert into username ('username', 'password') values ​​('xyz', 'abc'); it will work fine, but in netbeans the tables and field names are not in single quotes, but in `` this type of quotes, so it would be fine in netbeans to insert into values user

( username

, password

) ('xyz', 'abc'); where a string like xyz and abc is expressed in single quotes ...

0


source







All Articles