mysql failing to start due to permission errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mysql-server-5.0
I have installed ubuntu server 8.04, and have set up a directory structure where /var/lib is a symlink to a different volume (/mnt/fastdata/
May 7 15:51:55 vcke-gl-linux mysqld_safe[5886]: started
May 7 15:51:55 vcke-gl-linux kernel: [ 82.391726] audit(121013951
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 [Warning] Can't create test file /var/lib/
May 7 15:51:55 vcke-gl-linux kernel: [ 82.393387] audit(121013951
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 [Warning] Can't create test file /var/lib/
May 7 15:51:55 vcke-gl-linux kernel: [ 82.487247] audit(121013951
May 7 15:51:55 vcke-gl-linux mysqld[5890]: ^G/usr/sbin/mysqld: Can't create/write to file '/tmp/ib7jXL82' (Errcode: 13)
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 InnoDB: Error: unable to create temporary file; errno: 13
May 7 15:51:55 vcke-gl-linux kernel: [ 82.508111] audit(121013951
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 [ERROR] Can't start server : Bind on unix socket: Permission denied
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 [ERROR] Do you already have another mysqld server running on socket: /var/run/
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 [ERROR] Aborting
May 7 15:51:55 vcke-gl-linux mysqld[5890]:
May 7 15:51:55 vcke-gl-linux mysqld[5890]: 080507 15:51:55 [Note] /usr/sbin/mysqld: Shutdown complete
May 7 15:51:55 vcke-gl-linux mysqld[5890]:
May 7 15:51:55 vcke-gl-linux mysqld_safe[5892]: ended
As far as I can tell, the permissions in /var/lib/mysql are correct:
$ ls -ld /var/lib/mysql
drwxr-xr-x 3 mysql mysql 4096 2008-05-07 16:09 /var/lib/mysql
$ ls -ld /mnt/fastdata/
drwxr-xr-x 3 mysql mysql 4096 2008-05-07 16:09 /mnt/fastdata/
(/var/lib/ is a symlink to /mnt/fastdata/lib)
This seems to be a problem if the directory for mysql data is anywhere outside /var/lib/mysql : http://
I have tried purging and re-installing mysql-server-5.0 to no avail.
Other info:
$ apt-cache policy mysql-server-5.0
mysql-server-5.0:
Installed: 5.0.51a-3ubuntu5
Candidate: 5.0.51a-3ubuntu5
Version table:
*** 5.0.51a-3ubuntu5 0
500 http://
100 /var/lib/
$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04
Changed in mysql-dfsg-5.0: | |
status: | New → Invalid |
vik wrote: ubuntuforums. org/showthread. php?t=782224
> This seems to be a problem if the directory for mysql data is anywhere
> outside /var/lib/mysql : http://
Thanks a lot ofr taking the time to report this problem and help us make
Ubuntu better.
There is now an apparmor profile enabled by default for mysql that will
prevent mysql to access non standard area of the file system. Puting
the mysql profile in complain mode using "sudo aa-complain" as described
in [1] should show you this in the logs.
To fix this, you will need to add /mnt/fastdata/ var/lib/ mysql to the
list of authorized paths in the apparmor mysql profile you will find in
/etc/apparmor.d/.
Marking this bug as invalid as it reflects an intended behaviour.
[1] https:/ /help.ubuntu. com/8.04/ serverguide/ C/apparmor. html
status invalid