Find the answer to your Linux question:
Results 1 to 8 of 8
So, today I was messing around with MySQL, trying to get MySQLi to install, and then, not sure how I did it, uninstalled MySQL completely. For some reason, I can't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4

    Unhappy [CentOS] Uninstalled MySQL, and can't re-install


    So, today I was messing around with MySQL, trying to get MySQLi to install, and then, not sure how I did it, uninstalled MySQL completely. For some reason, I can't reinstall it either. It just says, no packages available. Can anybody help me?

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    What version of Centos are you using?
    Is it a new installation?
    How did you try to reinstall mysql?

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    Quote Originally Posted by yancek View Post
    What version of Centos are you using?
    Is it a new installation?
    How did you try to reinstall mysql?
    I tried yum install mysql-server mysql mysql-devel, and they all said no packages available.

    It's a relatively new installation, I just installed it two days ago, and I am using CentOS 5.6 x64

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Try this:

    first use rpm to remove the package names from the rpm database (just the package names, not the files themselves):
    Code:
    rpm -e --justdb mysql-server mysql mysql-devel
    then try to install them again, now that yum thinks they're gone:
    Code:
    yum install mysql-server mysql mysql-devel
    hth

  5. #5
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    Quote Originally Posted by atreyu View Post
    Try this:

    first use rpm to remove the package names from the rpm database (just the package names, not the files themselves):
    Code:
    rpm -e --justdb mysql-server mysql mysql-devel
    then try to install them again, now that yum thinks they're gone:
    Code:
    yum install mysql-server mysql mysql-devel
    hth
    root@localhost [~]# rpm -e --justdb mysql-server mysql mysql-devel
    error: package mysql-server is not installed
    error: package mysql is not installed
    error: package mysql-devel is not installed
    root@localhost [~]# yum install mysql-server mysql mysql-devel
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.san.fastserv.com
    * extras: mirror.5ninesolutions.com
    * updates: mirrors.usc.edu
    base | 2.1 kB 00:00
    c5-testing | 1.9 kB 00:00
    extras | 2.1 kB 00:00
    updates | 1.9 kB 00:00
    Excluding Packages in global exclude list
    Finished
    Reducing CentOS-5 Testing to included packages only
    Finished
    Setting up Install Process
    No package mysql-server available.
    No package mysql available.
    No package mysql-devel available.
    * Maybe you meant: MySQL-devel
    Nothing to do

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    okay, it appears your yum repo file(s) might not be finding the right mirror? I can see the packages you need right here:

    Index of /centos/5.6/os/x86_64/CentOS

    Let's look at your repo config - show the contents of the following:

    Code:
    grep -H . /etc/yum.repos.d/*.repo

  7. #7
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    http :// tinypaste. com/e7ac3

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    yikes, that's a lot of repos. let's just temporarily disable them and use a test repo.

    Disable (back up) the old repos:
    Code:
    mkdir /etc/yum.repos.d/DISABLED
    mv -v /etc/yum.repos.d/*.repo /etc/yum.repos.d/DISABLED/
    You should see a bunch of files get moved to that DISABLED dir. Now yum wont use them, but they are there if you ever need them again.

    Now make a test repo. Make the file /etc/yum.repos.d/centos.repo and put the following in it:
    Code:
    [centos]
    name=CentOS - $releasever - Base - $basearch
    baseurl=http://isoredirect.centos.org/centos/5.6/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    enabled=1
    See if you can see the repo:
    Code:
    yum repolist
    If that works, list available packages:
    Code:
    yum list available
    If that works, use yum as normal...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •