Page 1 of 1

install: SQL error DB function failed with error number 1064

Posted: Thu Feb 17, 2011 2:08 pm
by RuansGroup
hello,
when trying to install easybookreloaded_v2.0.8.1 onto my Joomla 1.5.22 CN version I get the following DB error message and installation is aborted.

Details:(i use wampserver2)
PHP version: 5.2.11
Web Server: Apache/2.2.17
mySQL 5.5.8
Joomla version: 1.5.22 (has been translated into Chinese)

* JInstaller::install: SQL error DB function failed with error number 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 'TYPE=MyISAM' at line 20 SQL=CREATE TABLE IF NOT EXISTS `jos_easybook` ( `id` int(10) NOT NULL auto_increment, `gbip` varchar(15) NOT NULL default '', `gbname` varchar(40) NOT NULL default '', `gbmail` varchar(60) default NULL, `gbmailshow` tinyint(1) NOT NULL default '0', `gbloca` varchar(50) default NULL, `gbpage` varchar(150) default NULL, `gbvote` int(10) default NULL, `gbtext` text NOT NULL, `gbdate` datetime default NULL, `gbcomment` text, `published` tinyint(1) NOT NULL default '0', `gbicq` varchar(20) default NULL, `gbaim` varchar(50) default NULL, `gbmsn` varchar(50) default NULL, `gbyah` varchar(50) default NULL, `gbskype` varchar(50) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM;
SQL =

CREATE TABLE IF NOT EXISTS `jos_easybook` (
`id` int(10) NOT NULL auto_increment,
`gbip` varchar(15) NOT NULL default '',
`gbname` varchar(40) NOT NULL default '',
`gbmail` varchar(60) default NULL,
`gbmailshow` tinyint(1) NOT NULL default '0',
`gbloca` varchar(50) default NULL,
`gbpage` varchar(150) default NULL,
`gbvote` int(10) default NULL,
`gbtext` text NOT NULL,
`gbdate` datetime default NULL,
`gbcomment` text,
`published` tinyint(1) NOT NULL default '0',
`gbicq` varchar(20) default NULL,
`gbaim` varchar(50) default NULL,
`gbmsn` varchar(50) default NULL,
`gbyah` varchar(50) default NULL,
`gbskype` varchar(50) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;

* 组件 安装: SQL error or lost or SQL cannot be read DB function failed with error number 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 'TYPE=MyISAM' at line 20 SQL=CREATE TABLE IF NOT EXISTS `jos_easybook` ( `id` int(10) NOT NULL auto_increment, `gbip` varchar(15) NOT NULL default '', `gbname` varchar(40) NOT NULL default '', `gbmail` varchar(60) default NULL, `gbmailshow` tinyint(1) NOT NULL default '0', `gbloca` varchar(50) default NULL, `gbpage` varchar(150) default NULL, `gbvote` int(10) default NULL, `gbtext` text NOT NULL, `gbdate` datetime default NULL, `gbcomment` text, `published` tinyint(1) NOT NULL default '0', `gbicq` varchar(20) default NULL, `gbaim` varchar(50) default NULL, `gbmsn` varchar(50) default NULL, `gbyah` varchar(50) default NULL, `gbskype` varchar(50) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM;
SQL =

CREATE TABLE IF NOT EXISTS `jos_easybook` (
`id` int(10) NOT NULL auto_increment,
`gbip` varchar(15) NOT NULL default '',
`gbname` varchar(40) NOT NULL default '',
`gbmail` varchar(60) default NULL,
`gbmailshow` tinyint(1) NOT NULL default '0',
`gbloca` varchar(50) default NULL,
`gbpage` varchar(150) default NULL,
`gbvote` int(10) default NULL,
`gbtext` text NOT NULL,
`gbdate` datetime default NULL,
`gbcomment` text,
`published` tinyint(1) NOT NULL default '0',
`gbicq` varchar(20) default NULL,
`gbaim` varchar(50) default NULL,
`gbmsn` varchar(50) default NULL,
`gbyah` varchar(50) default NULL,
`gbskype` varchar(50) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;


Do you have an idea what is wrong?

Re: install: SQL error DB function failed with error number

Posted: Thu Feb 17, 2011 2:11 pm
by Tonie
Mysql version is too high for the sql in that extension. If you exchange TYPE=MyISAM by ENGINE=MyISAM in the extension sql file, then try again. You will have to open the extension zip file for that, find the sql file, edit it and save the zip file again.

Re: install: SQL error DB function failed with error number

Posted: Thu Feb 17, 2011 2:30 pm
by RuansGroup
Tonie wrote:Mysql version is too high for the sql in that extension. If you exchange TYPE=MyISAM by ENGINE=MyISAM in the extension sql file, then try again. You will have to open the extension zip file for that, find the sql file, edit it and save the zip file again.

thank you for your suggestion
i got your point, this must be right
but i am still fail when amend both sql files install.nonutf8.sql, install.sql
let me check again

Re: install: SQL error DB function failed with error number

Posted: Wed Dec 21, 2011 3:26 pm
by jfdutoit
Hi,

Thanks, Tonie.

I searched far and wide for a solution. This one worked like charm.

:)

Re: install: SQL error DB function failed with error number

Posted: Mon Nov 05, 2012 1:30 pm
by tobydecks
Winner.
That worked perfectly.

Thanks Tonie.

Re: install: SQL error DB function failed with error number

Posted: Thu Jul 25, 2013 1:53 am
by saltriver
Want to run an extension designed for PHP for on a server with PHP 5? This is the fix for you!

Re: install: SQL error DB function failed with error number

Posted: Sun Jan 26, 2014 2:40 pm
by Preet1991
Hello, getting error while trying to install component in joomla 2.5 What is wrong with syntax??Please help Friends. :(
versions:
php : 5.4.12
MySql : 5.6.12
Apache : 2.4.4

JInstaller: :Install: Error SQL DB function failed with error number 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 ''id' INT(11), 'user_id' int(10) not null, 'msg' text, 'date_time' timestamp n' at line 2 SQL=create table if not exists #_openchat_msg( 'id' INT(11), 'user_id' int(10) not null, 'msg' text, 'date_time' timestamp not null default CURRENT_TIMESTAMP)ENGINE = MyISAM;
SQL =
create table if not exists #_openchat_msg(
'id' INT(11),
'user_id' int(10) not null,
'msg' text,
'date_time' timestamp not null default CURRENT_TIMESTAMP)ENGINE = MyISAM;
Component Install: SQL error file DB function failed with error number 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 ''id' INT(11), 'user_id' int(10) not null, 'msg' text, 'date_time' timestamp n' at line 2 SQL=create table if not exists #_openchat_msg( 'id' INT(11), 'user_id' int(10) not null, 'msg' text, 'date_time' timestamp not null default CURRENT_TIMESTAMP)ENGINE = MyISAM;
SQL =
create table if not exists #_openchat_msg(
'id' INT(11),
'user_id' int(10) not null,
'msg' text,
'date_time' timestamp not null default CURRENT_TIMESTAMP)ENGINE = MyISAM;

Re: install: SQL error DB function failed with error number

Posted: Sun Jan 26, 2014 9:48 pm
by dpacadmin
@ Preet1991
I note in your query;

Code: Select all

create table if not exists #_openchat_msg(
'id' INT(11),
'user_id' int(10) not null,
'msg' text,
'date_time' timestamp not null default CURRENT_TIMESTAMP)ENGINE = MyISAM;
this is in caps;

Code: Select all

'id' INT(11),
whereas this is not;

Code: Select all

'user_id' int(10)
Could the INT in caps be the problem?