Subject: | |
From: | |
Reply To: | |
Date: | Sat, 28 Jan 2012 21:47:41 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi Philipp,
On Jan 28, 2012, at 21:31 , Philipp Schiffer wrote:
> Populating my mysql on SL6.1 with biological data I ran into my primary SSDs limit and thus tried to move the location to another disk (HD). So I sudo cp -R'ed everything from /var/lib/mysql to /data/mysqldata and changed the permissions accordingly
> drwxr-xr-x. 10 mysql mysql 4096 Jan 28 12:20 mysqldata
> and inside mysqldata
> drwx------. 2 mysql mysql 4096 Jan 28 12:20 b2g
> -rw-r-----. 1 mysql mysql 178257920 Jan 28 20:50 ibdata1
> -rw-r-----. 1 mysql mysql 5242880 Jan 28 20:50 ib_logfile0
> -rw-r-----. 1 mysql mysql 5242880 Jan 28 20:50 ib_logfile1
> drwx------. 2 mysql mysql 4096 Jan 28 12:20 mysql
> drwx------. 2 mysql mysql 4096 Jan 28 12:20 orthotest
> Then went on to modify /etc/my.cnf to
> [mysqld]
> #datadir=/var/lib/mysql
> datadir=/data/mysqldata
> #socket=/var/lib/mysql/mysql.sock
> socket=/data/mysqldata/mysql.sock
> user=mysql
> # Disabling symbolic-links is recommended to prevent assorted security risks
> symbolic-links=0
> #basedir=/data
>
> [mysqld_safe]
> log-error=/var/log/mysqld.log
> pid-file=/var/run/mysqld/mysqld.pid.
>
> Having stopped the server before doing all this I now started again, but it failed to work. less /var/log/mysqld.log says:
> 120128 21:03:08 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
> 120128 21:09:06 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata
> 120128 21:09:06 [Warning] Can't create test file /data/mysqldata/superrechenknecht.lower-test
> 120128 21:09:06 [Warning] Can't create test file /data/mysqldata/superrechenknecht.lower-test
> ^G/usr/libexec/mysqld: Can't change dir to '/data/mysqldata/' (Errcode: 13)
> 120128 21:09:06 [ERROR] Aborting
>
> 120128 21:09:06 [Note] /usr/libexec/mysqld: Shutdown complete
>
> 120128 21:09:06 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
>
> Tried to set a symbolic link from /var/lib/mysql -> /data/mysqldata but that failed to work as well (actually why can't I change the ownership of the link from root:root to mysql:mysql?). Finally reading up on SElinux I edited my new mysql directory /data/mysqldata to look the same as the original mysql folder:
> drwxr-xr-x. mysql mysql system_u:object_r:mysqld_db_t:s0 mysqldata
> drwxr-xr-x. mysql mysql system_u:object_r:mysqld_db_t:s0 mysql_old
>
> and within mysqldata:
> drwx------. mysql mysql system_u:object_r:mysqld_db_t:s0 b2g
> -rw-r-----. mysql mysql unconfined_u:object_r:mysqld_db_t:s0 ibdata1
> -rw-r-----. mysql mysql unconfined_u:object_r:mysqld_db_t:s0 ib_logfile0
> -rw-r-----. mysql mysql unconfined_u:object_r:mysqld_db_t:s0 ib_logfile1
> drwx------. mysql mysql unconfined_u:object_r:mysqld_db_t:s0 mysql
> drwx------. mysql mysql unconfined_u:object_r:mysqld_db_t:s0 orthotest
> drwx------. mysql mysql system_u:object_r:mysqld_db_t:s0 sknstuff_insp
>
> However, even that does leads to the same error messages in the log file and I am really at a loss. Any help with this would be highly appreciated (especially as I need a working db quite urgently).
Try "chcon -t var_t /data" ?
Regards,
Stephan
--
Stephan Wiesand
DESY -DV-
Platanenenallee 6
15738 Zeuthen, Germany
|
|
|