mysql installation on ubuntu failed
2011 December 9
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:
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
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:
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
Then I get a clean (re)install of mysql and it started up.
5 Responses
leave one →


















thanks – i was about to rebuild my server when i found this and it worked. I messed up a new mysql install while moving the data director, then i couldn’t reinstall. This cleaned it up.
You are welcome Ben. I too almost gave up and thought about a complete rebuild!
Thanks so much for this – I couldn’t figure out what was wrong for the life of me.
Incidentally, I think you meant ‘/etc/mysql’ instead of ‘/var/etc/mysql’ in the last rm line of your instructions.
Thanks Steve for catching the typo!
Thanks, this worked for me on Ubuntu 10.04.3 LTS. I started off with the following error:
ERROR: 1050 Table ‘plugin’ already exists
When I reinstalled mysql-server I started getting the same error as you. Running your solution finally fixed it.