Jimmy’s Blog

Solving failed starting mysql service with non default datadir (Ubuntu)

by jimmy on Jun.19, 2009, under English, Linux

I used to put my mysql data dir to /home/mysql, just to separated the partition so when something goes wrong or upgrading the OS I won’t lose my mysql data just because I forgot to backup it.

After I upgrade from Ubuntu 8.04 to Ubuntu 9.04 suddenly my mysql failed to start.
The strange thing the only data dir seems working is putting it on /var/lib/mysql which is the default directory for mysql data dir.

After browsing around I found out that it is apparmor that prevent mysql datadir on different directory.

So the easy way to solve this is to remove apparmor : apt-get –purge remove apparmor

Related posts:

  1. Change junit & run file (main class) working directory at Netbeans 5.5 Web Project
  2. Displaying row number (rownum) in MySQL
  3. Solving Pidgin cannot connect to Yahoo Messenger (YM)

:, , , ,

Leave a Reply

Anti-Spam Protection by WP-SpamFree

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...