install: SQL error DB function failed with error number 1064

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
RuansGroup
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Feb 17, 2011 5:54 am
Contact:

install: SQL error DB function failed with error number 1064

Postby RuansGroup » Thu Feb 17, 2011 2:08 pm

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?

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

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

Postby Tonie » Thu Feb 17, 2011 2:11 pm

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.

User avatar
RuansGroup
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Feb 17, 2011 5:54 am
Contact:

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

Postby RuansGroup » Thu Feb 17, 2011 2:30 pm

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

jfdutoit
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Mar 28, 2011 2:43 pm

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

Postby jfdutoit » Wed Dec 21, 2011 3:26 pm

Hi,

Thanks, Tonie.

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

:)

tobydecks
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Sep 17, 2009 11:30 am

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

Postby tobydecks » Mon Nov 05, 2012 1:30 pm

Winner.
That worked perfectly.

Thanks Tonie.

saltriver
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sun Jul 15, 2007 7:28 pm

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

Postby saltriver » Thu Jul 25, 2013 1:53 am

Want to run an extension designed for PHP for on a server with PHP 5? This is the fix for you!

Preet1991
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jan 26, 2014 2:24 pm

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

Postby Preet1991 » Sun Jan 26, 2014 2:40 pm

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;

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6021
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

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

Postby dpacadmin » Sun Jan 26, 2014 9:48 pm

@ 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?


Return to “Extensions for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 15 guests