package mysql-server-5.0 5.1.30really5.0.75-0ubuntu10.2 failed to install/upgrade: le sous-processus post-installation script a retourn? une erreur de sortie d'?tat 1

Bug #383087 reported by Marc Uszynski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 9.04

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: le sous-processus post-installation script a retourné une erreur de sortie d'état 1
NonfreeKernelModules: nvidia
Package: mysql-server-5.0 5.1.30really5.0.75-0ubuntu10.2
SourcePackage: mysql-dfsg-5.0
Title: package mysql-server-5.0 5.1.30really5.0.75-0ubuntu10.2 failed to install/upgrade: le sous-processus post-installation script a retourné une erreur de sortie d'état 1
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
Marc Uszynski (uszynski) wrote :
Revision history for this message
Mathias Gug (mathiaz) wrote :

Relevant errors:

 * Starting MySQL database server mysqld
   ...fail!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg : erreur de traitement de mysql-server-5.0 (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 1

Could you post the content of /var/log/daemon.log around the time of the upgrade to identify why mysqld failed to start?

Changed in mysql-dfsg-5.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
Marc Uszynski (uszynski) wrote :
Download full text (13.6 KiB)

Sorry, I tried to look for a solution but could not succeed.
here is part of daemon.log:

Jul 2 10:26:51 maison-desktop mysqld_safe[722]: 090702 10:26:51 [Warning] Can't create test file /home/mysql/maison-desktop.lower-test
Jul 2 10:26:51 maison-desktop mysqld_safe[722]: 090702 10:26:51 [Warning] Can't create test file /home/mysql/maison-desktop.lower-test
Jul 2 10:26:51 maison-desktop mysqld_safe[722]: ERROR: 1005 Can't create table 'db' (errno: 13)
Jul 2 10:26:51 maison-desktop mysqld_safe[722]: 090702 10:26:51 [ERROR] Aborting
Jul 2 10:26:51 maison-desktop mysqld_safe[722]:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: 090702 10:26:52 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 2 10:26:52 maison-desktop mysqld_safe[722]:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: Installation of system tables failed!
Jul 2 10:26:52 maison-desktop mysqld_safe[722]:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: Examine the logs in /home/mysql for more information.
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: You can try to start the mysqld daemon with:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: /usr/sbin/mysqld --skip-grant &
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: and use the command line tool
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: /usr/bin/mysql to connect to the mysql
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: database and look at the grant tables:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: shell> /usr/bin/mysql -u root mysql
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: mysql> show tables
Jul 2 10:26:52 maison-desktop mysqld_safe[722]:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: Try 'mysqld --help' if you have problems with paths. Using --log
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: gives you a log in /home/mysql that may be helpful.
Jul 2 10:26:52 maison-desktop mysqld_safe[722]:
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: The latest information about MySQL is available on the web at
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: http://www.mysql.com
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: Please consult the MySQL manual section: 'Problems running mysql_install_db',
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: and the manual section that describes problems on your OS.
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: Another information source is the MySQL email archive.
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: Please check all of the above before mailing us!
Jul 2 10:26:52 maison-desktop mysqld_safe[722]: And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
Jul 2 10:26:52 maison-desktop mysqld_safe[763]: 090702 10:26:52 [Warning] Can't create test file /home/mysql/maison-desktop.lower-test
Jul 2 10:26:52 maison-desktop mysqld_safe[763]: 090702 10:26:52 [Warning] Can't create test file /home/mysql/maison-desktop.lower-test
Jul 2 10:26:52 maison-desktop mysqld_safe[763]: ERROR: 1146 Table 'mysql.user' doesn't exist
Jul 2 10:26:52 maison-desktop mysqld_safe[763]: 090702 10:26:52 [ERROR] Aborting
Jul 2 10:26:52 maison-desktop mysqld_safe[763]:
Jul 2 10:26:52 maison-desktop...

Revision history for this message
Mathias Gug (mathiaz) wrote :

It seems that you're using a non-standard location to hold your data (/home/mysql). There may be an issue with mysqld AppArmor profile. See https://wiki.ubuntu.com/DebuggingApparmor for more information to deal with this issue.

Could you please provide the following information:

 * apparmor audit messages related to mysqld:

    /var/log/kern.log

 * mysqld apparmor profile:

    /etc/apparmor.d/usr.sbin.mysqld

 * mysql configuration stripped of private information (such as password):

    /etc/mysql/my.cnf

 * extra mysql configuration from the conf.d directory:

    /etc/mysql/conf.d/

Revision history for this message
Marc Uszynski (uszynski) wrote :
Download full text (7.4 KiB)

Here they are:

  /var/log/kern.log

Jul 2 10:26:51 maison-desktop kernel: [518763.806843] type=1503 audit(1246523211.630:219): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=743 profile="/usr/sbin/mysqld"
Jul 2 10:26:51 maison-desktop kernel: [518763.806996] type=1503 audit(1246523211.630:220): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=743 profile="/usr/sbin/mysqld"
Jul 2 10:26:51 maison-desktop kernel: [518764.165577] type=1503 audit(1246523211.990:221): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=113 name="/home/mysql/mysql/db.frm" pid=748 profile="/usr/sbin/mysqld"
Jul 2 10:26:52 maison-desktop kernel: [518764.538544] type=1503 audit(1246523212.362:222): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=761 profile="/usr/sbin/mysqld"
Jul 2 10:26:52 maison-desktop kernel: [518764.538682] type=1503 audit(1246523212.362:223): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=761 profile="/usr/sbin/mysqld"
Jul 2 10:26:52 maison-desktop kernel: [518764.781240] type=1503 audit(1246523212.606:224): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=772 profile="/usr/sbin/mysqld"
Jul 2 10:26:52 maison-desktop kernel: [518764.783887] type=1503 audit(1246523212.606:225): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=772 profile="/usr/sbin/mysqld"
Jul 2 10:26:52 maison-desktop kernel: [518764.996091] type=1503 audit(1246523212.822:226): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=779 profile="/usr/sbin/mysqld"
Jul 2 10:26:52 maison-desktop kernel: [518764.996690] type=1503 audit(1246523212.822:227): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=779 profile="/usr/sbin/mysqld"
Jul 2 10:26:53 maison-desktop kernel: [518765.188316] type=1503 audit(1246523213.014:228): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/mysql/maison-desktop.lower-test" pid=786 profile="/usr/sbin/mysqld"

/etc/apparmor.d/usr.sbin.mysqld

# 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>
  #include <abstractions/winbind>

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /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/log/mysql.log rw,
  /var/log/mysql.err rw,
  /var/lib/mysql/ r,
  /var/lib/mysql/** rwk,
  /var/log/mysql/ r,
  ...

Read more...

Revision history for this message
Marc Uszynski (uszynski) wrote :

I found what was not correct :

my /etc/apparmor.d/usr.sbin.mysqld was not correctly set up with the location I use for mysql (/home/mysql)

Tow lines:

/var/lib/mysql/ r,
/var/lib/mysql/** rwk,

should be replaced by:

/home/mysql/ r,
/home/mysql/** rwk,

It is well described in
http://case.oncle-tom.net/2008/05/04/modifier-emplacement-donnees-serveur-mysql/

Thanks.
Maybe it can help others.

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 383087] Re: package mysql-server-5.0 5.1.30really5.0.75-0ubuntu10.2 failed to install/upgrade: le sous-processus post-installation script a retourn? une erreur de sortie d'?tat 1

On Tue, Sep 15, 2009 at 09:27:21AM -0000, Marc Uszynski wrote:
> I found what was not correct :
>
> my /etc/apparmor.d/usr.sbin.mysqld was not correctly set up with the
> location I use for mysql (/home/mysql)
>

  status invalid

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com

Changed in mysql-dfsg-5.0 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.