Howto reinstall/fix broken installations of MySQL on your VPS (or individual systems)

Write your "How To" regarding anything you are comfortable with and you feel it will help the forum members.

NOTE :: All threads started here will appear only after the approval from Administrator
Post Reply
mbjones
Posts: 1
Joined: Sat Jul 28, 2007 6:35 am

Howto reinstall/fix broken installations of MySQL on your VPS (or individual systems)

Post by mbjones »

This is a fairly quick tutorial that I thought my be helpful for anyone getting a VPS loaded with Fedora Core 5. While it comes loaded with apache, php, etc the default mysql installation is unfortunately broken (only the client tools are installed -- no server daemon). Unfortunately because versioning needs to be taken into account you've got to be careful about installing the server piece. Here's the easiest way to do it (for mea at least -- I like knowing that everything fits together so starting from scratch as I describe is a great fit):

1. First find out what mysql packages are installed:

<code>rpm -qa</code>

This above command gives a list of all installed packages. Sift through it to find the mysql packages and make note of the names.

2. If no server package is installed, you'll know things need adjusting. Rather than tracking down specific versions, which can prove tricky, I chose to just start from scratch. To do this we need to remove the already installed packages:

<code>rpm -e --allmatches 'mysql package names, no quotes'</code>

Make sure you just put in the names of the mysql packages -- that's all that needs removing at this point in time.

3. Now, we are at ground zero. Head to mysql.org to download the community server packages. Either record the link locations or download and scp them to your VPS. The packages needed can be found here: http://mysql.org/downloads/mysql/5.0.ht ... 32bit-rpms

Get these: The server package, the client package, the client libraries package and the shared libraries package.

4. Install the rpm's. The command (if you are installing over web) would be this:

<code>rpm -Uvh http://mirrors.24-7-solutions.net/pub/m ... 3.i386.rpm http://mirrors.24-7-solutions.net/pub/m ... 3.i386.rpm http://mirror.trouble-free.net/mysql_mi ... 3.i386.rpm http://mirrors.24-7-solutions.net/pub/m ... .rpm</code>

Just with the appropriate links.

5. The server piece should automatically start upon finish. Check this by using the following command:

<code>service mysql status</code>

The return text should be something to the effect of "MySQL server is running!"

6. Setup and secure your mysql instance as you need to. Everything should be working fine now.


SHAdmin
Posts: 2089
Joined: Sat Dec 18, 2004 11:28 am
Contact:

Post by SHAdmin »

Excellent and most awaited technical 'How To'.

You have been credited 40 points for sharing it
Post Reply