Results 1 to 3 of 3

Thread: Unable to change the MySQL datadir

  1. #1
    Join Date
    Nov 2011
    Beans
    14

    Unable to change the MySQL datadir

    As given in the below forum thread, I followed all the steps
    http://lists.mysql.com/mysql/220448

    But after changing the datadir option in my.conf, MySQL will not get started showing this
    ganit@garo:~$ sudo service mysql start
    start: Job failed to start

    Even if I just change the name of /var/lib/mysql to /var/lib/mysql_old
    and change name accordingly in my.conf, service doesnt get started.

    Thanks in advance,

  2. #2
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Unable to change the MySQL datadir

    On Ubuntu you also need to edit the MySQL AppArmor profile to give the MySQL daemon access to the new location.
    I'm not on a Ubuntu machine with MySQL installed at the moment but I believe the file you need to edit is /etc/apparmor.d/usr.sbin.mysqld.
    Cheesemill

  3. #3
    Join Date
    Nov 2011
    Beans
    14

    Re: Unable to change the MySQL datadir

    Cheesemill, thanks for the update
    http://stackoverflow.com/questions/1...data-directory. I found this thread and eventually I wound up fixing the issue.

    Thank you,

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •