0

I have install mysql cluster on one of our linux machines, we did a pilot and decided to use replication instead. Now I want to remove it and install mysql-server.

I have removed all the old files as much as I could, now everytime I

apt-get install mysql-server

it seems to install but puts no files in /etc

I tried to purge the install and try again a few times with no luck.

Anyone have any ideas on how to completely remove mysql and start a new?

** Update **

Tried suggested purge remove

apt-get --purge remove mysql-server && apt-get clean && apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.0 (5.0.67-0ubuntu6) ...
 * 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
Errors were encountered while processing:
 mysql-server-5.0
E: Sub-process /usr/bin/dpkg returned an error code (1)

5 Answers 5

1

Have you tried this?

apt-get --purge remove mysql-server && apt-get clean && apt-get install mysql-server

Update:

The purge failed because the removal script errored when it went to find a file. You'll need to get your package manager back to a consistent state; at first blush I would be tempted to reinstall mysql-server, do a touch on the missing file, and then do the purge all over, but I suspect that the script is probably trying to extract the password(s) that were stored in there, so this may not work either.

1
  • no luck with that, I update the question with the results
    – Brian G
    Jun 26, 2009 at 16:22
0

You didn't say if you installed it via a package or from source. If you installed it by package, you will need to purge the package first. Debian packages have two states of removal; removed and purged. When you remove a package, it removes the files that were in the package, but leaves the configuration files and any directories that aren't empty. Purging a package runs an additional script that cleans up directories and additional files. You can purge a package by running:

# dpkg --purge package

or

# apt-get remove --purge package

This may not totally solve your problem. dpkg has special support for configuration files. It will not replace configuration files if they do not exist when you upgrade. This is so you don't delete a file, only to find an upgrade puts it back. You can fix this by telling dpkg to ignore this behaviour using --force-confmiss

# dpkg --force-confmiss -i /tmp/foo_2.0.0-14_all.deb

You should now find the configuration files are installed.

0

apt-get --purge remove mysql-server

apt-get clean

apt-get install mysql-server

other is use GUI for install and reinstall it work better some time.

0

dpkg --force-confmiss -i /tmp/foo_2.0.0-14_all.deb

THAT DID IT!! YES!!! THANX!!!! WOO!HOO!

in my case is was: sudo dpkg --force-confmiss -i mysql-common_5.1.41-3ubuntu12.6_all.deb

and THAT replaced the /etc/mysql/my.cnf file that was missing. Yes, I dinked with it and lost it. My bad, but this fixed it!! Ric

0

The following finally worked for me:

apt-get --purge remove mysql-server mysql-server-5.1 mysql-common mysql-server*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .