![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Server Platforms Discussion regarding the Ubuntu Server Edition. For more information on the Ubuntu Server Team, please visit their wiki page or Launchpad page. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
First Cup of Ubuntu
![]() Join Date: Jun 2008
Beans: 3
|
i'm having a very weird problem installing mysql. i created a big RAID-5 array (/dev/md0) mounted on /var/media. if i do
mysql_install_db --datadir=/var/media/mysql i get: $ sudo mysql_install_db --datadir=/var/media/mysql Installing MySQL system tables... 080603 20:22:53 [Warning] Can't create test file /var/media/mysql/monolith.lower-test 080603 20:22:53 [Warning] Can't create test file /var/media/mysql/monolith.lower-test ERROR: 1005 Can't create table 'db' (errno: 13) 080603 20:22:53 [ERROR] Aborting 080603 20:22:53 [Note] /usr/sbin/mysqld: Shutdown complete Installation of system tables failed! It works just fine if I install it on /var/lib/mysql, or /tmp, or anywhere else basically. Of course, I'm out of space everywhere else and I want to use the giant RAID i put together specifically for this purpose... I don't have any problem creating files on this partition as root, or as a normal user in a directory that has user write permission. I just noticed message like this in the system log: Jun 3 20:22:53 monolith kernel: [ 9834.697327] audit(1212549773.394:53): type=1503 operation="inode_create" requested_mask="w::" denied_mask="w::" name="/var/media/mysql/monolith.lower-test" pid=11679 profile="/usr/sbin/mysqld" namespace="default" That's a new one on me... ? Last edited by heddhunter; June 3rd, 2008 at 11:35 PM.. |
|
|
|
|
|
#2 |
|
Tall Cafè Ubuntu
![]() Join Date: May 2007
Location: Phoenix, Arizona USA
Beans: 2,588
Kubuntu 8.10 Intrepid Ibex
|
Re: mysql/bizarre permission denied errors as root
Check the ownership AND permissions on /var/lib/mysql and make them excactly the same on /var/media.
Also, from googling, it looks like this is an apparmor problem. I disable apparmor in my installs because IMHO it causes more problems than it's worth. -Tim
__________________
"Better to use a Mac and be thought a fool than to use Windows and remove all doubt" www.windependence.org Get your Windependence today! |
|
|
|
|
|
#3 | |
|
First Cup of Ubuntu
![]() Join Date: Jun 2008
Beans: 3
|
Re: mysql/bizarre permission denied errors as root
Quote:
i am new to ubuntu (but have a dozen years of unix/bsd/redhat under my belt) so i'd never heard of apparmor before today. i think you are right about it being more trouble than it's worth. |
|
|
|
|
|
|
#4 |
|
Way Too Much Ubuntu
![]() Join Date: Jul 2007
Location: London
Beans: 260
Ubuntu 8.04 Hardy Heron
|
Re: mysql/bizarre permission denied errors as root
I've also just hit this one, but I'm not doing anything "funny" - everything is the installation default. AppArmor won't let MySQL start. Would this class as a bug? Surely the default apt-get install mysql should work?
What needs to be changed? I assume it is something in /etc/apparmor.d/usr.sbin.mysqld For now I am testing and have simply disabled the whole of AppArmor. Ultimately this is not what I want to do I have the default: # vim:syntax=apparmor # Last Modified: Tue Jun 19 17:37:30 2007 #include <tunables/global> /usr/sbin/mysqld { #include <abstractions/base> #include <abstractions/nameservice> #include <abstractions/user-tmp> #include <abstractions/mysql> capability dac_override, capability setgid, capability setuid, /etc/hosts.allow r, /etc/hosts.deny r, /etc/group m, /etc/passwd m, /etc/mysql/*.pem r, /etc/mysql/conf.d/ r, /etc/mysql/conf.d/* r, /etc/mysql/my.cnf r, /usr/sbin/mysqld mr, /usr/share/mysql/** r, /var/lib/mysql/ r, /var/lib/mysql/** rwk, /var/log/mysql/ r, /var/log/mysql/* rw, /var/run/mysqld/mysqld.pid w, /var/run/mysqld/mysqld.sock w, } And it won't let MySQL create the socket, /var/run/mysqld/mysqld.sock I get: kernel: [ 1185.380430] audit(1212667771.111:15): type=1503 operation="inode_permission" requested_mask="w::" denied_mask="w::" name="/var/lib/lwidentity/lwidentity_privileged/pipe" pid=6770 profile="/usr/sbin/mysqld" namespace="default" and /etc/init.d/mysql[6932]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|