Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
Hello All Sorry to re-visit a post that is over a year old, but is this the answer then? Originally Posted by chris_calcite If you have ever tried to move ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Dec 2007
    Posts
    2

    Hello All

    Sorry to re-visit a post that is over a year old, but is this the answer then?

    Quote Originally Posted by chris_calcite View Post
    If you have ever tried to move the root of an apache web server you'll have seen something like this before - I'm pretty sure it's SELinux, which is normally on by default.

    If you start 'system-config-securitylevel' (RHEL/CentOS) in a graphical environment and click on th SELinux tab, then right down at the bottom of the 'Modify SELinux Policy' section there is a menu item 'SELinux Service Protection'. Expand this and one of the items is 'Disable SELinux protection for mysqld daemon'. Check the box next to this and click 'OK'. /etc/init.d/mysqld should now start (well, unless there's other errors in /etc/my.cnf of course!)

    HYH, Chris.
    I'm still finding my way around Linux and had the same problem as the original poster, CanMike. What seems odd to me is that the thing works fine for /var/lib/mysql but not for a folder of my choosing. Like CanMike mine worked fine once I changed /etc/my.cnf back to the original settings.

    Maybe its just me but 'Disable SELinux protection' seems a bit extreme as a way to fix what is likely to be a very common problem

  2. #12
    Just Joined!
    Join Date
    Feb 2007
    Posts
    2
    You just need to relabel the storage area. This is what i did on my Fedora Core 7:
    Code:
    chcon -R -u system_u -r object_r -t mysqld_db_t /home/mysqldb
    chcon -R -u system_u -r object_r -t mysqld_db_t /var/lib/mysql/
    chcon -u system_u -r object_r -t mysqld_etc_t /etc/my.cnf
    Just substitute the dir containing your datafile in the first command.

    I still have problems with httpd (with httpd_sys_content_t) trying to access /etc/my.cnf, but i can live with it.

  3. #13
    Just Joined!
    Join Date
    Dec 2007
    Posts
    2

    Thumbs up

    Thanks spremi

    I'll try that.

  4. $spacer_open
    $spacer_close
  5. #14
    Just Joined!
    Join Date
    Nov 2009
    Posts
    1
    I had this same problem in Ubuntu 8.04. Problem was caused by AppArmor preventing access to new file location. I purged AppArmor from system but you could alter profile for mySQL.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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