# Syntax error SQL on Postfixadmin setup.php



## Blodia (Dec 15, 2009)

Hello everybody, 

first, Excuse my English, but I do not speak English well.

Here is my problem:

When i launch http://[i]my_ip_address/postfixadmin/setup.php[/i]

I have this message at the bottom of list:


```
DEBUG INFORMATION:
Invalid query: 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 DEFAULT /*!40100 CHARACTER SET latin1 COLLATE latin1_swedish_ci */ C' at line 9
```


----------



## SirDice (Dec 15, 2009)

What version of mysql do you have?

Did you install the port or a package?


----------



## Blodia (Dec 15, 2009)

Mysql6.0


----------



## Blodia (Dec 15, 2009)

with port intall


----------



## SirDice (Dec 15, 2009)

Hmm..


```
CREATE table (.....) TYPE=MyISAM
```

Looks like mysql 5.0 type definition. 5.1 (and higher) only accepts:

```
CREATE table (.....) ENGINE=MyISAM
```

So it looks like you need to install mysql 5.0 instead of 6.0.


----------



## Blodia (Dec 15, 2009)

How i can downgrade mysql, i don't want reinstall my server and mysql


----------



## SirDice (Dec 15, 2009)

`# pkg_delete -x mysql`

And install the proper version of mysql.


----------



## Blodia (Dec 15, 2009)

When i make this command, i have this message:


```
pkg_delete: package 'php5-mysql-5.2.11' is required by these other packages
and may not be deinstalled:
php5-extensions-1.3
postfixadmin-2.2.1.1
pkg_delete: package 'php5-mysqli-5.2.11' is required by these other packages
and may not be deinstalled:
postfixadmin-2.2.1.1
```


----------



## SirDice (Dec 15, 2009)

Ok.. `# pkg_delete -rx mysql`, then you also need to reinstall all those ports/packages.


----------



## Blodia (Dec 16, 2009)

IWhen i make this command, ihave this message:


```
pkg_delete: '/usr/local/www/postfixadmin/config.inc.php' fails original MD5 checksum - not deleted.
pkg_delete: unable to completely remove directory '/usr/local/www/postfixadmin'
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)
```

Sorry, but i'm a newbie.


----------



## SirDice (Dec 16, 2009)

Ignore them, it tells you it couldn't remove config.inc.php because it's been edited.


----------



## Blodia (Dec 16, 2009)

Ok, thank you for all.
Have a nice day.


----------



## Blodia (Dec 16, 2009)

*Resolved*

This post is resolved.:e


----------



## johnblue (Dec 25, 2009)

Blodia said:
			
		

> and may not be deinstalled:
> postfixadmin-2.2.1.1


postfixadmin-2.2.1.1 and older contained this SQL bug.  Instead of uninstalling everything, you should have upgraded to postfixadmin 2.3, which is in the ports.


----------

