# Xampp - MySQL issue Joomla



## Frederik S (Mar 5, 2011)

Hi Guys
I am trying to test Joomla locally and I have installed Xampp and configured a mysql database via phpMyadmin and made a user that Joomla can use which has rights to everything.

The issue is that the Joomla installer can connect to the db (it seems) but gives me this error 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`' at line 29 SQL=CREATE TABLE `jos_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default '0', `type` varchar(30) NOT NULL default 'banner', `name` varchar(255) NOT NULL default '', `alias` varchar(255) NOT NULL default '', `imptotal` int(11) NOT NULL default '0', `impmade` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0', `imageurl` varchar(100) NOT NULL default '', `clickurl` varchar(200) NOT NULL default '', `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default '0', `checked_out` tinyint(1) NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `editor` varchar(50) default NULL, `custombannercode` text, `catid` INTEGER UNSIGNED NOT NULL DEFAULT 0, `description` TEXT NOT NULL DEFAULT '', `sticky` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `ordering` INTEGER NOT NULL DEFAULT 0, `publish_up` datetime NOT NULL default '0000-00-00 00:00:00', `publish_down` datetime NOT NULL default '0000-00-00 00:00:00', `tags` TEXT NOT NULL DEFAULT '', `params` TEXT NOT NULL DEFAULT '', PRIMARY KEY (`bid`), KEY `viewbanner` (`showBanner`), INDEX `idx_banner_catid`(`catid`) ) TYPE=MyISAM CHARACTER SET `utf8` 


I have tried using the "advanced tab" in the joomla installation and ticked off delete all tables in the DB, but same issue.

Do any of you guys have experience with this.

I am running win7 x64 and the newest stable version of xampp.

Thanks for looking!

Cheers,
Frederik


----------



## v12dock (Mar 5, 2011)

You have joomla pointing to localhost and the correct port?

And you have your user name and password correct?

Also I remember there are some security setting that you can configure with the initial installation of xampp via web interface, if I remember correctly.


----------



## Frederik S (Mar 5, 2011)

Everything in xampp looks right. And the user name and password are filled out correctly. If I alter them to something wrong I just get the usual cannot connect to db error from the joomla installer.


----------



## streetfighter 2 (Mar 5, 2011)

What version of MySQL are you using?

Apparently older versions of MySQL don't support UTF-8 so changing
_TYPE=MyISAM CHARACTER SET `utf8`_​to 
_TYPE=MyISAM_​fixes the problem.

Full code (before):

```
CREATE TABLE `jos_banner` ( 
	`bid` int(11) NOT NULL auto_increment, 
	`cid` int(11) NOT NULL default '0', 
	`type` varchar(30) NOT NULL default 'banner', 
	`name` varchar(255) NOT NULL default '', 
	`alias` varchar(255) NOT NULL default '', 
	`imptotal` int(11) NOT NULL default '0', 
	`impmade` int(11) NOT NULL default '0', 
	`clicks` int(11) NOT NULL default '0', 
	`imageurl` varchar(100) NOT NULL default '', 
	`clickurl` varchar(200) NOT NULL default '', 
	`date` datetime default NULL, 
	`showBanner` tinyint(1) NOT NULL default '0', 
	`checked_out` tinyint(1) NOT NULL default '0', 
	`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', 
	`editor` varchar(50) default NULL, `custombannercode` text, 
	`catid` INTEGER UNSIGNED NOT NULL DEFAULT 0, 
	`description` TEXT NOT NULL DEFAULT '', 
	`sticky` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, 
	`ordering` INTEGER NOT NULL DEFAULT 0, 
	`publish_up` datetime NOT NULL default '0000-00-00 00:00:00', 
	`publish_down` datetime NOT NULL default '0000-00-00 00:00:00', 
	`tags` TEXT NOT NULL DEFAULT '', 
	`params` TEXT NOT NULL DEFAULT '', 
	PRIMARY KEY (`bid`), 
	KEY `viewbanner` (`showBanner`), 
	INDEX `idx_banner_catid`(`catid`) 
) TYPE=MyISAM CHARACTER SET `utf8`;
```

Full code (after):

```
CREATE TABLE `jos_banner` ( 
	`bid` int(11) NOT NULL auto_increment, 
	`cid` int(11) NOT NULL default '0', 
	`type` varchar(30) NOT NULL default 'banner', 
	`name` varchar(255) NOT NULL default '', 
	`alias` varchar(255) NOT NULL default '', 
	`imptotal` int(11) NOT NULL default '0', 
	`impmade` int(11) NOT NULL default '0', 
	`clicks` int(11) NOT NULL default '0', 
	`imageurl` varchar(100) NOT NULL default '', 
	`clickurl` varchar(200) NOT NULL default '', 
	`date` datetime default NULL, 
	`showBanner` tinyint(1) NOT NULL default '0', 
	`checked_out` tinyint(1) NOT NULL default '0', 
	`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', 
	`editor` varchar(50) default NULL, `custombannercode` text, 
	`catid` INTEGER UNSIGNED NOT NULL DEFAULT 0, 
	`description` TEXT NOT NULL DEFAULT '', 
	`sticky` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, 
	`ordering` INTEGER NOT NULL DEFAULT 0, 
	`publish_up` datetime NOT NULL default '0000-00-00 00:00:00', 
	`publish_down` datetime NOT NULL default '0000-00-00 00:00:00', 
	`tags` TEXT NOT NULL DEFAULT '', 
	`params` TEXT NOT NULL DEFAULT '', 
	PRIMARY KEY (`bid`), 
	KEY `viewbanner` (`showBanner`), 
	INDEX `idx_banner_catid`(`catid`) 
) TYPE=MyISAM;
```
Only the last line is changed.

Also I wrote a rather concise setup guide for a LAMP VM that you might be interested in (as it has a fairly recent version of MySQL et al.):
http://www.techpowerup.com/forums/showthread.php?t=140736


----------



## Frederik S (Mar 5, 2011)

I am running MySQL version: mysqlnd 5.0.7 and I have set collation to utf8_general_ci which should work with Joomla 1.5.


----------



## streetfighter 2 (Mar 5, 2011)

Frederik S said:


> I am running MySQL version: mysqlnd 5.0.7 and I have set collation to utf8_general_ci which should work with Joomla 1.5.


Problem with the engine then?

You can remove the line completely and it should use the default character set and engine.  No harm in trying it.

As in this:
_) TYPE=MyISAM CHARACTER SET `utf8`;_​to this:
_);_​


----------



## caleb (Mar 7, 2011)

I have



> ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci;


In my scripts from some db on version  5.0.51a.


----------

