# [SOLVED] SELinux: Problems with Database on a new Partition

## tuner23

Hello,

i moved my database to a new partition and now i have problems starting the MySQL daemon.

i tried out:

```

[root@dark ~]# semanage fcontext -a -t mysqld_db_t "/data/mysql(/.*)?"

[root@dark ~]# restorecon -Rv /data/mysql

```

But it does not work due to the new mounted partition:

```

type=AVC msg=audit(1377089907.440:32411): avc:  denied  { getattr } for  pid=7721 comm="mysqld" path="/data" dev=sdb3 ino=2 scontext=unconfined_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir

```

I searched a lot, but couldn't find out how i can allow access for /dev/sdb3 to mysqld.

When i start the daemon without selinux everything works well..

Can someone help me out here?

Greets,

Antonis.Last edited by tuner23 on Wed Aug 21, 2013 4:40 pm; edited 1 time in total

----------

## tuner23

Ah, ok.

I solved it:

```

[root@dark ~]# semanage fcontext -a -t mysqld_db_t "/data"

[root@dark ~]# restorecon -Rv /data

```

Thanks.

----------

