old_passwords.cnf: No such file or directory

Bug #330982 reported by Martin Vysny
2
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: mysql-server

2.6.24-19-server #1 SMP Wed Aug 20 18:43:06 UTC 2008 x86_64 GNU/Linux
Ubuntu 8.04.2

I was unable to connect to a fresh install of mysql-server as the root user didn't work without a password. I was not asked for the password in the installation phase. So I tried sudo apt-get autoremove --purge mysql-server and then sudo apt-get install mysql-server and this happened:

$ sudo 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 libnet-daemon-perl libplrpc-perl mysql-client-5.0 mysql-server-5.0
Suggested packages:
  dbishell libcompress-zlib-perl mysql-doc-5.0 tinyca
Recommended packages:
  libhtml-template-perl mailx
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl mysql-client-5.0 mysql-server mysql-server-5.0
0 upgraded, 7 newly installed, 0 to remove and 8 not upgraded.
Need to get 0B/37.3MB of archives.
After this operation, 112MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package libnet-daemon-perl.
(Reading database ... 26211 files and directories currently installed.)
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.601-1_amd64.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.005-1_amd64.deb) ...
Selecting previously deselected package mysql-client-5.0.
Unpacking mysql-client-5.0 (from .../mysql-client-5.0_5.0.51a-3ubuntu5.4_amd64.deb) ...
Selecting previously deselected package mysql-server-5.0.
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-3ubuntu5.4_amd64.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.0.51a-3ubuntu5.4_all.deb) ...
Setting up libnet-daemon-perl (0.38-1.1) ...
Setting up libplrpc-perl (0.2017-1.1) ...
Setting up libdbi-perl (1.601-1) ...
Setting up libdbd-mysql-perl (4.005-1) ...
Setting up mysql-client-5.0 (5.0.51a-3ubuntu5.4) ...
Setting up mysql-server-5.0 (5.0.51a-3ubuntu5.4) ...
 * Stopping MySQL database server mysqld [ OK ]
/var/lib/dpkg/info/mysql-server-5.0.postinst: line 143: /etc/mysql/conf.d/old_passwords.cnf: No such file or directory
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)

Revision history for this message
Martin Vysny (vyzivus) wrote :

Okay, fix proposed by http://ohioloco.ubuntuforums.org/showthread.php?t=626443 worked. It was necessary to purge mysql-common (if you have a package which depends on mysql-common then just sudo dpkg --purge --force-depends mysql-common; sudo apt-get install -f . In my case, it was proftpd).
How to simulate the bug (probably): install proftpd, then install mysql-server (it shouldn't prompt for a password), then purge mysql-server and try to install it again.

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

Thank you for taking the time to report this bug and helping to make Ubuntu better. You should be prompted for a password when installing mysql-server the first time. How were you installing mysql-server package?

Changed in mysql-dfsg-5.0:
status: New → Incomplete
Revision history for this message
Martin Vysny (vyzivus) wrote :

Thank you Mathias for quick reply. I did a simple sudo apt-get install mysql-server (there is no X on the server machine, so no GUI package manager). I am sure that it didn't prompt me for the password for the first time I tried this (maybe somebody uninstalled mysql-server earlier without purging it?). I couldn't guess the password so I tried to sudo apt-get autoremove --purge mysql-server (which succeeded) and then sudo apt-get install mysql-server again. This time it asked for the root password correctly, however the installation failed with the above error.

Chuck Short (zulcss)
Changed in mysql-dfsg-5.0 (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Low
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.