Pages

Thursday, April 25, 2013

[ Joomla ] 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 .....

Khi install joomla ( 1.5.22 ) gặp bug sau :

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 .....


- Problem ?
The keyword ‘TYPE’ was introduced as deprecated since ENGINE was added in MySQL 4.0.18.
in the CREATE TABLE structure manaul page (http://dev.mysql.com/doc/refman/4.1/en/create-table.html) that the TYPE keyword will be removed in future versions.

Do vậy khi install joomla trên mysql v 5.x sẽ có bug này. tham khảo create command được run khi install joomla.
CREATE TABLE `#__bannertrack` (
`track_date` date NOT NULL,
`track_type` int(10) unsigned NOT NULL,
`banner_id` int(10) unsigned NOT NULL
) TYPE=MyISAM CHARACTER SET `utf8`;
- Giải quyết :tham khảo http://www.devraju.com/programming/joomla-1-5-22-installation-sql-problem-typemyisam-solution-enginemyisam/
==> Tóm tắt : tìm Joomlafolder/installation/sql/mysql/joomla.sql và replace all : ‘TYPE=MyISAM’ to ‘ENGINE=MyISAM’

No comments:

Post a Comment