Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My MySQL server has broken down, and I can't figure out why. Trying to do a yum reinstall I get this: Error: mysql-server conflicts with mysql-server

I figure that's because the server already had the mysql server, and when I ran the upgrade, everything got messed up.

I'm unable to access MySQL, so I can't even do a mysqldump. How can I reinstall without compromising my existing databases?

share|improve this question
add comment

3 Answers 3

up vote 4 down vote accepted

The mysql-server package is designed such that it will not touch user data on either remove or install. The issue you're seeing is probably that you have the i386 package installed and it wants the x86_64 package instead, or vice versa. You will need the full yum output in order to proceed.

share|improve this answer
add comment

If you want to do a reinstalation of your mysql take a loo at this: all your data is in /var/lib/mysql (check your my.conf) do a copy of all your data in another folder and then do the changes... you can also

check your repos ... rearrange them an install mysql from scrath.. is safer to do all that and becarefull nextime... So do this two things before the reinstalation.

  • check the version of your mysql.
  • do the copy of /var/lib/mysql ex:(as root) cp -R /var/lib/mysql /tmp/mysql.bck
share|improve this answer
add comment

It seems you have different versions of mysql-server being offered by different repos. I'm not sure which one you had running, so I can't tell you which repos to diable. I'm assuming you are running CentOS, but it could be anything with yum.

You can also use repoquery (installed with yum-utils) to check which files your mysql-server package installed and where the databases were located (or find out the initialization script, if that's the way your package installs MySQL).

The next thing, before you do anything else, is to back-up the database files themselves. If you want to have hope of recovering the data, you'll need them.

Once you found out what the exact version of MySQL you were running, installing a fresh box (Amazon's EC2 is your friend) with that exact version and copying the data files over the freshly installed ones may (big if here, and don't do it with MySQL up) allow you do run mysqldump on your database.

As for you original question, I don't think a sane mysql-server package would destroy your installed databases, but I wont bet your data on that.

Good luck.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.