Elxis CMS Forum

Support => Installation => Topic started by: Farhad Sakhaei on May 08, 2012, 16:27:29

Title: MySQL problem in step 4 or 5
Post by: Farhad Sakhaei on May 08, 2012, 16:27:29
Hi,
I upgraded MySQL to version 5.5
It seems that 5.5 does not support TYPE

I see these errors when I want to install Elxis :

Code: [Select]
mysql error [1064] : EXECUTE
URI: index.php
Message: 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 CHARACTER SET utf8 COLLATE utf8_general_ci' at line 19
CREATE TABLE `elx_banner` ( `bid` INTEGER NOT NULL AUTO_INCREMENT, `cid` INTEGER NOT NULL DEFAULT 0, `type` VARCHAR(10) NOT NULL DEFAULT 'banner', `name` VARCHAR(50), `imptotal` INTEGER NOT NULL DEFAULT 0, `impmade` INTEGER NOT NULL DEFAULT 0, `clicks` INTEGER NOT NULL DEFAULT 0, `imageurl` VARCHAR(100), `clickurl` VARCHAR(200) NOT NULL, `dateadded` TIMESTAMP NOT NULL, `showbanner` TINYINT NOT NULL DEFAULT 0, `checked_out` TINYINT NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '1979-12-19 00:00:00', `editor` VARCHAR(50), `custombannercode` TEXT, `targetbanner` TINYINT NOT NULL DEFAULT 1, PRIMARY KEY (`bid`) ) TYPE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci
mysql error [1146] : EXECUTE
URI: index.php
Message: Table 'de4376wf_sw2tqef.elx_banner' doesn't exist
ALTER TABLE `elx_banner` ADD INDEX `elx_viewbanner` (`showbanner`)

What we should do ?
Title: Re: MySQL problem in step 4 or 5
Post by: ahmet on May 08, 2012, 22:10:38
i guess its because of charset of the database..
when i wanted to carry the site, i was faced to same problem ..
Title: Re: MySQL problem in step 4 or 5
Post by: datahell on May 09, 2012, 11:10:38
Open the SQL file and replace "TYPE" with "ENGINE" wherever this is found.

ENGINE=MyISAM
Title: Re: MySQL problem in step 4 or 5
Post by: Farhad Sakhaei on May 09, 2012, 11:17:15
Hi John , Thank you for your reply

Do you mean the file : /installation/schema/elxis.xml ?
Title: Re: MySQL problem in step 4 or 5
Post by: datahell on May 09, 2012, 18:33:14
Either you use an outdated version of Elxis or a modified one...
Elxis 2009.3 already uses ENGINE instead of TYPE.
Title: Re: MySQL problem in step 4 or 5
Post by: Farhad Sakhaei on May 12, 2012, 21:39:10
I checked the Elxis 2009.3 , The problem is in it too

To solve the problem I changed this line in : includes/adodb/adodb-datadict.inc.php

Line: 590

Replace:

$sql[0] .= ' TYPE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci';

to :

$sql[0] .= ' ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci';


Now everything is perfect :)
Title: Re: MySQL problem in step 4 or 5
Post by: datahell on May 12, 2012, 23:47:34
I know were the problem is but this has been changed since February 27, 2011 (attribute TYPE became deprecated on newer mysql versions).
This is why I told you that you don't use the official release or you use an outdated one.
Title: Re: MySQL problem in step 4 or 5
Post by: Farhad Sakhaei on May 13, 2012, 08:18:49
Oh, Sorry , I was not inform about the new revision
I was used the last download of elxis 2009.3 which I had on my computer
Sorry , Sorry :)