Dear Sir/Madam,

We are using NSIS to install an application. and we have a MySql Script file, which is using inside the installer class. This file is working with Mysql but not from the installer. This is giving a ERROR 42000 syntax error. Any help will be appreciated

Arun G.K

>This is giving a ERROR 42000 syntax error

Can you post/show us that MySql script file?

Dear adatapost, Thanks for your reply, We are using NSIS to install an application and the script file contains normal MySql Create Table syntax for example

delimiter $$
CREATE TABLE 'admin` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`server_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci$$


This script is executing in MySql query Browser but while installing the installer it is showing the following Error.

-------------------------------------ERROR-----------------------------------

2010/12/22 10:41:08,ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.47-community]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 'delimiter $$

CREATE TABLE `admin` (
`id` bigint(20) NOT NULL AUTO_INC' at line 1

Single quote at [B]'[/B]admin[B]`[/B]

delimiter $$
CREATE TABLE `admin` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`server_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci$$
This article has been dead for over six months. Start a new discussion instead.