mysql installation on ubuntu failed

We often use wordpress as the CMS for our application's public site. That means we have to install mysql on our rackspace servers. Today the installation process failed several times, with this error message in syslog.

Error:

[shell]

ERROR: 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 'ALTER TABLE user ADD column Show_view_priv enum\('N','Y') CHARACTER SET utf8 NOT ' at line 1

[/shell]

I first try to uninstall and reinstall sqlserver but it will not uninstall cleanly. Finally I have to both use apt-get and manually remove some directories to get back to a clean install:

[shell] apt-get purge mysql-server apt-get purge mysql-common rm -rf /var/log/mysql rm -rf /var/log/mysql.* rm -rf /var/lib/mysql rm -rf /etc/mysql # and then: apt-get install mysql-server --fix-missing --fix-broken [/shell]

Then I get a clean (re)install of mysql and it started up.