[apport] package mysql-server-5.0 failed to install/upgrade: host.frm (and other tables from mysql database) not found

Bug #123427 reported by Francesco Peeters
112
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Happened in upgrade from 6.10 to 7.04 (Edgy to Feisty) with the 'Distribution upgrade' tool

ProblemType: Package
Date: Sun Jul 1 20:49:19 2007
ErrorMessage:
 ErrorMessage: subprocess post-installation script returned error exit status 1
Package: mysql-server-5.0
SourcePackage: mysql-dfsg-5.0

Revision history for this message
Jaakan Shorter (jaakanshorter) wrote :

jaakan@AMD64:~$ cd /var/lib/dpkg/info
jaakan@AMD64:/var/lib/dpkg/info$ sudo sh -x ./mysql-server-5.0.postinst configure
+ . /usr/share/debconf/confmodule
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/debconf/frontend ./mysql-server-5.0.postinst configure
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "start" failed.
jaakan@AMD64:/var/lib/dpkg/info$

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 123427] Re: [apport] package mysql-server-5.0 failed to install/upgrade:

Does anything interesting show up in /var/log/syslog?

--
Soren Hansen
Ubuntu Server Team
http://www.ubuntu.com/

Revision history for this message
Jaakan Shorter (jaakanshorter) wrote : Re: [apport] package mysql-server-5.0 failed to install/upgrade:

Jul 23 19:28:25 AMD64 mysqld_safe[16281]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: To do so, start the server, then issue the following commands:
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: /usr/bin/mysqladmin -u root password 'new-password'
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: /usr/bin/mysqladmin -u root -h AMD64 password 'new-password'
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: See the manual for more instructions.
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: Please report any problems with the /usr/bin/mysqlbug script!
Jul 23 19:28:25 AMD64 mysqld_safe[16281]:
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: The latest information about MySQL is available on the web at
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: http://www.mysql.com
Jul 23 19:28:25 AMD64 mysqld_safe[16281]: Support MySQL by buying support/licenses at http://shop.mysql.com
Jul 23 19:28:26 AMD64 mysqld_safe[16342]: ERROR: 1046 No database selected
Jul 23 19:28:26 AMD64 mysqld_safe[16342]: 070723 19:28:26 [ERROR] Aborting
Jul 23 19:28:26 AMD64 mysqld_safe[16342]:
Jul 23 19:28:26 AMD64 mysqld_safe[16342]: 070723 19:28:26 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 23 19:28:26 AMD64 mysqld_safe[16342]:
Jul 23 19:28:27 AMD64 mysqld_safe[16434]: started
Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 InnoDB: Started; log sequence number 0 43655
Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/host.frm'
Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/host.frm'
Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/host.frm'
Jul 23 19:28:28 AMD64 mysqld_safe[16450]: ended
Jul 23 19:28:42 AMD64 /etc/init.d/mysql[16608]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul 23 19:28:42 AMD64 /etc/init.d/mysql[16608]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jul 23 19:28:42 AMD64 /etc/init.d/mysql[16608]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jul 23 19:28:42 AMD64 /etc/init.d/mysql[16608]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jul 23 19:28:42 AMD64 /etc/init.d/mysql[16608]:
jaakan@AMD64:/var/log$

Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 123427] Re: [apport] package mysql-server-5.0 failed to install/upgrade:

Jaakan Shorter wrote:

> Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/host.frm'

When you stop mysql (/etc/init.d/mysql stop), does file
/var/lib/mysql/mysql/host.frm exist?

Revision history for this message
Francesco Peeters (francesco-fampeeters) wrote : Re: [Bug 123427] Re: [apport] package mysql-server-5.0 failed to install/upgrade:

On Tue, July 24, 2007 01:32, Jaakan Shorter wrote:
> Jul 23 19:28:27 AMD64 mysqld_safe[16434]: started
> Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 InnoDB: Started; log
> sequence number 0 43655
> Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR]
> /usr/sbin/mysqld: Incorrect information in file: './mysql/host.frm'
> Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR]
> /usr/sbin/mysqld: Incorrect information in file: './mysql/host.frm'
> Jul 23 19:28:28 AMD64 mysqld[16437]: 070723 19:28:28 [ERROR] Fatal error:
> Can't open and lock privilege tables: Incorrect information in file:
> './mysql/host.frm'
> Jul 23 19:28:28 AMD64 mysqld_safe[16450]: ended

Although details vary, the main part agrees with above. I too received the
privilege table error.

I cannot check any details anymore, because I needed the database to
run... So I did an 'apt-get remove --purge', then reinstalled and restored
the last backup I had of the database...

--
Francesco Peeters
----
GPG Key = AA69 E7C6 1D8A F148 160C D5C4 9943 6E38 D5E3 7704
If your program doesn't recognize my signature, please visit
http://www.CAcert.org/index.php?id=3 to retrieve the Root CA certificate.

Revision history for this message
Jaakan Shorter (jaakanshorter) wrote : Re: [apport] package mysql-server-5.0 failed to install/upgrade:
Download full text (12.4 KiB)

I see that file and I did a cat on it and it looks like its half a log / half binary

jaakan@AMD64:/var/lib/mysql/mysql$ ls -aln
total 800
drwxr-xr-x 2 120 122 4096 2007-07-24 02:29 .
drwxr-xr-x 4 120 122 4096 2007-07-24 02:29 ..
-rw-rw---- 1 120 122 8820 2007-07-03 23:24 columns_priv.frm
-rw-rw---- 1 120 122 0 2007-07-03 23:24 columns_priv.MYD
-rw-rw---- 1 120 122 1024 2007-07-03 23:24 columns_priv.MYI
-rw-rw---- 1 120 122 9494 2007-07-14 00:48 db.frm
-rw-rw---- 1 120 122 876 2007-07-14 00:48 db.MYD
-rw-rw---- 1 120 122 4096 2007-07-14 00:48 db.MYI
-rw-rw---- 1 120 122 10330 2007-07-03 23:24 func.frm
-rw-rw---- 1 120 122 0 2007-07-03 23:24 func.MYD
-rw-rw---- 1 120 122 1024 2007-07-03 23:24 func.MYI
-rw-rw---- 1 120 122 8700 2007-06-08 21:13 help_category.frm
-rw-rw---- 1 120 122 20916 2007-07-24 02:29 help_category.MYD
-rw-rw---- 1 120 122 3072 2007-07-24 02:29 help_category.MYI
-rw-rw---- 1 120 122 8612 2007-06-08 21:13 help_keyword.frm
-rw-rw---- 1 120 122 75845 2007-07-24 02:29 help_keyword.MYD
-rw-rw---- 1 120 122 14336 2007-07-24 02:29 help_keyword.MYI
-rw-rw---- 1 120 122 8630 2007-06-08 21:13 help_relation.frm
-rw-rw---- 1 120 122 6723 2007-07-24 02:29 help_relation.MYD
-rw-rw---- 1 120 122 13312 2007-07-24 02:29 help_relation.MYI
-rw-rw---- 1 120 122 8770 2007-06-08 21:13 help_topic.frm
-rw-rw---- 1 120 122 332964 2007-07-24 02:29 help_topic.MYD
-rw-rw---- 1 120 122 17408 2007-07-24 02:29 help_topic.MYI
-rw-rw---- 1 120 122 9494 2007-07-03 23:24 host.frm
-rw-rw---- 1 120 122 0 2007-07-03 23:24 host.MYD
-rw-rw---- 1 120 122 1024 2007-07-03 23:24 host.MYI
-rw-rw---- 1 120 122 9691 2007-07-03 23:24 proc.frm
-rw-rw---- 1 120 122 0 2007-07-03 23:24 proc.MYD
-rw-rw---- 1 120 122 1024 2007-07-03 23:24 proc.MYI
-rw-rw---- 1 120 122 8875 2007-07-03 23:24 procs_priv.frm
-rw-rw---- 1 120 122 0 2007-07-03 23:24 procs_priv.MYD
-rw-rw---- 1 120 122 1024 2007-07-03 23:24 procs_priv.MYI
-rw-rw---- 1 120 122 8665 2007-07-03 23:24 #sql-17fe_4.frm
-rw-rw---- 1 120 122 8947 2007-07-03 23:24 tables_priv.frm
-rw-rw---- 1 120 122 0 2007-07-03 23:24 tables_priv.MYD
-rw-rw---- 1 120 122 1024 2007-07-03 23:24 tables_priv.MYI
-rw-rw---- 1 120 122 8636 2007-06-08 21:13 time_zone.frm
-rw-rw---- 1 120 122 8624 2007-06-08 21:13 time_zone_leap_second.frm
-rw-rw---- 1 120 122 0 2007-06-08 21:13 time_zone_leap_second.MYD
-rw-rw---- 1 120 122 1024 2007-06-08 21:13 time_zone_leap_second.MYI
-rw-rw---- 1 120 122 0 2007-06-08 21:13 time_zone.MYD
-rw-rw---- 1 120 122 1024 2007-06-08 21:13 time_zone.MYI
-rw-rw---- 1 120 122 8606 2007-06-08 21:13 time_zone_name.frm
-rw-rw---- 1 120 122 0 2007-06-08 21:13 time_zone_name.MYD
-rw-rw---- 1 120 122 1024 2007-06-08 21:13 time_zone_name.MYI
-rw-rw---- 1 120 122 8686 2007-06-08 21:13 time_zone_transition.frm
-rw-rw---- 1 120 122 0 2007-06-08 21:13 time_zone_transition.MYD
-rw-rw---- 1 120 122 1024 2007-06-08 21:13 time_zone_transition.MYI
-rw-rw---- 1 120 122 8748 2007-06-08 21:13 time_zone_transition_type.frm
-rw-rw---- 1 120 122 0 2007-06-08 21:13 time_zone_transition_type.MYD
-rw-rw---- 1 120 122 1024 ...

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

Can you post the content of your mysql configuration file (/etc/mysql/my.cnf) ? (Be careful to strip out any sensitive information such as password).

Changed in mysql-dfsg-5.0:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
mfalcon (syracuse) wrote :
Download full text (4.2 KiB)

I had this problem back in July/2007 when performing a routine update on Ubuntu 6.10 ... after several months uninstall/reinstall and no reply's from posts on various boards, I decided to upgrade to Fiesty 7.04 ... The problem still exists! This seems to be the #1 complaint ... What is common with everyone? I'm running MythTV which depends on the mySQL db.

HELP!

$ cat /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by defau...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-dfsg-5.0 (Ubuntu) because there has been no activity for 60 days.]

Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.0:
status: Invalid → Incomplete
Revision history for this message
Wim Feijen (wimfeijen) wrote :
Download full text (9.2 KiB)

Hello, I am curious if any solution (or cause) has been found, because I seem to be encountering the same problem:

wim@wim-laptop:/var/lib/mysql/mysql$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
The following packages were automatically installed and are no longer required
  gs-esp-x libneon25 feisty-wallpapers libstlport5.1 vnc-common
  python-docutils python-roman libgpod1 libavformat0d xvncviewer
  python-imaging libcurl3 zope-common libflac7 feisty-session-splashes
  libjasper-1.701-1 libavcodec0d libgs-esp8 libquicktime0 liba52-0.7.4
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up mysql-server-5.0 (5.0.45-1ubuntu3) ...
 * Stopping MySQL database server mysqld [ OK
 * Starting MySQL database server mysqld [fail
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
wim@wim-laptop:/var/lib/mysql/mysql$ sudo dpkg --configure -a
Setting up mysql-server-5.0 (5.0.45-1ubuntu3) ...
 * Stopping MySQL database server mysqld [ OK
 * Starting MySQL database server mysqld [fail
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.0
 mysql-server
wim@wim-laptop:/var/lib/mysql/mysql$ sudo aptitude --purge remove mysql-server
.0 mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
The following packages are unused and will be REMOVED:
  feisty-session-splashes{p} feisty-wallpapers{p} gs-esp-x{p}
  liba52-0.7.4{p} libavcodec0d{p} libavformat0d{p} libcurl3{p} libflac7{p}
  libgpod1{p} libgs-esp8{p} libjasper-1.701-1{p} libneon25{p}
  libquicktime0{p} libstlport5.1{p} python-docutils{p} python-imaging{p}
  python-roman{p} vnc-common{p} xvncviewer{p} zope-common{p}
The following packages will be REMOVE...

Read more...

Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote : Re: [Bug 123427] Re: [apport] package mysql-server-5.0 failed to install/upgrade:
Download full text (13.4 KiB)

i install it using pbuilder login and it works fine (in gutsy and
feisty)

root@Marvin:/# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl
  libplrpc-perl mysql-client-5.0 mysql-common mysql-server-5.0 psmisc
Suggested packages:
  dbishell libcompress-zlib-perl mysql-doc-5.0 tinyca
Recommended packages:
  mailx
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl
  libplrpc-perl mysql-client-5.0 mysql-common mysql-server
mysql-server-5.0
  psmisc
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 37.2MB/37.3MB of archives.
After unpacking 110MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://archive.ubuntu.com gutsy/main mysql-common 5.0.45-1ubuntu3
[55.8kB]
Get:2 http://archive.ubuntu.com gutsy/main libdbi-perl 1.57-1 [791kB]
Get:3 http://archive.ubuntu.com gutsy/main libmysqlclient15off
5.0.45-1ubuntu3 [1866kB]
Get:4 http://archive.ubuntu.com gutsy/main libdbd-mysql-perl 4.004-2
[136kB]
Get:5 http://archive.ubuntu.com gutsy/main mysql-client-5.0
5.0.45-1ubuntu3 [7493kB]
Get:6 http://archive.ubuntu.com gutsy/main psmisc 22.5-1
[54.8kB]
Get:7 http://archive.ubuntu.com gutsy/main mysql-server-5.0
5.0.45-1ubuntu3 [26.8MB]
Get:8 http://archive.ubuntu.com gutsy/main mysql-server 5.0.45-1ubuntu3
[49.8kB]
Fetched 37.2MB in 10m11s
(60.9kB/s)
Preconfiguring packages ...
Selecting previously deselected package mysql-common.
(Reading database ... 12347 files and directories currently installed.)
Unpacking mysql-common
(from .../mysql-common_5.0.45-1ubuntu3_all.deb) ...
Selecting previously deselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl
(from .../libnet-daemon-perl_0.38-1.1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2017-1.1_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.57-1_i386.deb) ...
Selecting previously deselected package libmysqlclient15off.
Unpacking libmysqlclient15off
(from .../libmysqlclient15off_5.0.45-1ubuntu3_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl
(from .../libdbd-mysql-perl_4.004-2_i386.deb) ...
Selecting previously deselected package mysql-client-5.0.
Unpacking mysql-client-5.0
(from .../mysql-client-5.0_5.0.45-1ubuntu3_i386.deb) ...
Selecting previously deselected package psmisc.
Unpacking psmisc (from .../psmisc_22.5-1_i386.deb) ...
Setting up mysql-common (5.0.45-1ubuntu3) ...
Selecting previously deselected package mysql-server-5.0.
(Reading database ... 12610 files and directories currently installed.)
Unpacking mysql-server-5.0
(from .../mysql-server-5.0_5.0.45-1ubuntu3_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server
(from .../mysql-server_5.0.45-1ubuntu3_all.deb) ...
Setting up libnet-daemon-per...

Revision history for this message
mfalcon (syracuse) wrote : RE: [Bug 123427] Re: [apport] package mysql-server-5.0 failed toinstall/upgrade:
Download full text (9.8 KiB)

This is what I did and it was the only solution after many failed
uninstall/removal/upgrade attempts:

Backup ALL your data files, including the mySQL systems tables.
Remove the files from the file system.
Perform the upgrade.
Restore your data files from backup (except the system tables).

/\/\att

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Wim
Feijen
Sent: Sunday, October 28, 2007 11:32 AM
To: <email address hidden>
Subject: [Bug 123427] Re: [apport] package mysql-server-5.0 failed
toinstall/upgrade:

Hello, I am curious if any solution (or cause) has been found, because I
seem to be encountering the same problem:

wim@wim-laptop:/var/lib/mysql/mysql$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
The following packages were automatically installed and are no longer
required
  gs-esp-x libneon25 feisty-wallpapers libstlport5.1 vnc-common
  python-docutils python-roman libgpod1 libavformat0d xvncviewer
  python-imaging libcurl3 zope-common libflac7 feisty-session-splashes
  libjasper-1.701-1 libavcodec0d libgs-esp8 libquicktime0 liba52-0.7.4 Use
'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up mysql-server-5.0 (5.0.45-1ubuntu3) ...
 * Stopping MySQL database server mysqld [
OK
 * Starting MySQL database server mysqld
[fail
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured Errors were encountered while
processing:
 mysql-server-5.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
wim@wim-laptop:/var/lib/mysql/mysql$ sudo dpkg --configure -a Setting up
mysql-server-5.0 (5.0.45-1ubuntu3) ...
 * Stopping MySQL database server mysqld [
OK
 * Starting MySQL database server mysqld
[fail
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured Errors were encountered while
processing:
 mysql-server-5.0
 mysql-server
wim@wim-laptop:/var/lib/mysql/mysql$ sudo aptitude --purge remove
mysql-server .0 mysql-server Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Writing extende...

Read more...

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [apport] package mysql-server-5.0 failed to install/upgrade:

Could you post the content of /var/log/daemon.log related to mysqld process at the time of the first upgrade ?

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in mysql-dfsg-5.0:
status: Incomplete → Invalid
Revision history for this message
Torsten Bronger (bronger) wrote :

I experienced this bug independently on my Ubuntu 8.05 desktop and on a fresh Server Edition. Both share almost no configuration. On the Server Edition, the whole MySQL setup is at defaults, nevertheless, the very first restart of MySQL failed already:

bronger@bob:~/src/chantal$ sudo /etc/init.d/mysql start
 * Stopping MySQL database server mysqld [ OK ]
 * Starting MySQL database server mysqld [fail]

daemon.log says:

Aug 15 10:48:54 bob mysqld_safe[7817]: started
Aug 15 10:48:55 bob mysqld[7821]: 080815 10:48:55 InnoDB: Started; log sequence number 0 43665
Aug 15 10:48:55 bob mysqld[7821]: 080815 10:48:55 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
Aug 15 10:48:55 bob mysqld_safe[7832]: ended

Re-installing mysql-server helps on my desktop machine but not for very long.

If you google for the error message, it may have something to do with the settings in my.cnf, most notable basedir and datadir, however, this didn't help me.

Changed in mysql-dfsg-5.0:
status: Invalid → New
Revision history for this message
Torsten Bronger (bronger) wrote :

This is a plea for pushing up this bug and bug #105457 in your priority list. I know how delicate such request are, and I haven't made something like this before.

But after having experienced both bugs on two very different machines (desktop and server edition) in almost pristine setups, and taking into account how many people made follow-ups here, I think I can safely claim that "MySQL server" is broken on Ubuntu currently. The fact that there are workarounds doesn't help really, since you have to apply the workarounds over and over again. Even worse, bug #105457 occurs silently.

Unfortunately, I have almost no in-depth knowledge about MySQL and Bash myself. However, I can easily reproduce the bugs. I'm willing to help hunting down them with short response times.

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

Do you have any files in /var/lib/mysql/ ?

Changed in mysql-dfsg-5.0:
status: New → Incomplete
Revision history for this message
Heitzso (heitzso) wrote : Re: [Bug 123427] Re: [apport] package mysql-server-5.0 failed to install/upgrade:

:: Do you have any files in /var/lib/mysql/ ?

I just checked two of my systems and, yes, there are files there.

However, I wrestled through this on all of the boxes I hit it.
It bit me on at least three systems. It is an extremely awkward process
to wrestle through the bug ... typically taking several hours of thrash on
each box. But I have mysql working on the other side of the bug
insanity on all of the systems.

Heitzso

Revision history for this message
Torsten Bronger (bronger) wrote : Re: [apport] package mysql-server-5.0 failed to install/upgrade:

Yes, I have files in "/var/lib/mysql/":

-rw-r--r-- 1 mysql mysql 0 2008-08-15 12:59 debian-5.0.flag
-rw-rw---- 1 mysql mysql 10485760 2008-09-01 22:06 ibdata1
-rw-rw---- 1 mysql mysql 5242880 2008-09-01 22:06 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 2008-08-12 15:24 ib_logfile1
drwx------ 2 mysql mysql 4096 2008-08-15 12:59 mysql
-rw------- 1 mysql mysql 7 2008-08-12 15:24 mysql_upgrade_info

"mysql" is my database itself. My personal workaround is that after experiencing this bug, I run

sudo apt-get remove --purge mysql-server-5.0 && sudo apt-get install mysql-server

Of course, I answer the dialog whether I want to remove the database itself, too, with "no".

Revision history for this message
Torsten Bronger (bronger) wrote :

Today, I found out that the very same root cause also prevents database dump for backups from working:

> mysqldump --opt mysql > mysql.sql
mysqldump: Couldn't execute '/*!40103 SET TIME_ZONE='+00:00' */': Table 'mysql.time_zone_name' doesn't exist (1146)

After re-installing mysql-server, it works again. Thus, not only the internal user table but also the timezone table is gone. Maybe all other internal tables, too.

Again: This makes backups via a database dump impossible. Is this really "Importance: Medium"?

By the way, the only maintainer question for making this "incomplete" bug complete for almost one year was, "Do you have any files in /var/lib/mysql/?" Of course I have: There is my database after all! Look, I'm really willing to help with this but please do it seriously.

Or, declare that until further notice MySQL Server doesn't work on Ubuntu and that you recommend PostgreSQL.

Revision history for this message
Bruce Miller (brm0423) wrote :

I am having a comparable problem running squeezecenter on Intrepid Ibex development versions. Some builds of squeezecenter work; others do not, but it appears to depend on whether the purge / re-install of mysql-server and mysql-server-5.0 is successful or not.

This is my screen output:
Setting up mysql-server-5.0 (5.0.67-0ubuntu6) ...
 * Stopping MySQL database server mysqld [ OK ]
Reloading AppArmor profiles 'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 Profile /etc/apparmor.d/usr.sbin.mysqld-akonadi failed to load
 Skipping profile /etc/apparmor.d/usr.sbin.mysqld-akonadi.dpkg-new
: Warning.
'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 * Starting MySQL database server mysqld [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

Setting up mysql-server (5.0.67-0ubuntu6) ...
Setting up squeezecenter (7.2.1~23416) ...
changed ownership of `/var/lib/squeezecenter/Plugins' to squeezecenter:nogroup
Reloading AppArmor profiles 'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 Profile /etc/apparmor.d/usr.sbin.mysqld-akonadi failed to load
 Skipping profile /etc/apparmor.d/usr.sbin.mysqld-akonadi.dpkg-new
: Warning.
'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared

update-rc.d: warning: /etc/init.d/squeezecenter missing LSB style header
Starting SqueezeCenter Audio Server.

Setting up akonadi-server (1.0.0-0ubuntu3) ...
Reloading AppArmor profiles 'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 Profile /etc/apparmor.d/usr.sbin.mysqld-akonadi failed to load
: Failed.
invoke-rc.d: initscript apparmor, action "force-reload" failed.

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

Could you provide the listing of /var/lib/mysql/mysql/ (ie the files from the mysql database)?

Revision history for this message
Chuck Short (zulcss) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in mysql-dfsg-5.0 (Ubuntu):
status: Incomplete → Invalid
dahlan (chestazan-gmail)
Changed in mysql-dfsg-5.0 (Ubuntu):
status: Invalid → Incomplete
Chuck Short (zulcss)
Changed in mysql-dfsg-5.0 (Ubuntu):
status: Incomplete → Won't Fix
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.