Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-02-2008, 12:59 AM   #1
Registered: May 2006
Posts: 52

Rep: Reputation: 15
Question Mysql upgrade without GUI


Can anyone explain how to upgrade MySql from 4.1 to 5.0 in a CentOS 4 server? I can only access it through ssh, so everything needs to be done from the command line. I have tried with 'yum upgrade mysql', but it does not go beyond the current version number and only updates to the latest MySql4 version.

I would appreciate any help.
Old 04-02-2008, 07:37 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971
mysql 5 is apparently in the centosplus repositories (unless it's gone more mainline than this... so just ensure that your yum repo is enabled for that version and you should then be able to do yum upgrade to it. I'd suggest doing a "yum search mysql" to see all the potential packages available, as in that link you'd want mysql-server, not just mysql
Old 04-02-2008, 03:03 PM   #3
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
yum search mysql* displays lots of packages, but none of them is from version 5.
And I'm afraid I don't know how to "enable my yum repo for that version". Somewhere else they told me to try:
yum --enablerepo=centosplus upgrade mysql*

but it gives me:

Setting up repositories
Cannot access repository dir //var/cache/yum/centosplus
Error: Cannot access repository dir //var/cache/yum/centosplus

Any more detailed instructions would be appreciated.

Thanks a lot.
Old 04-05-2008, 05:04 PM   #4
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
Anyone knows how is yum supposed to know the url of repositories? That is, how it translates a name like 'centosplus' into the url where the packages are located?
Old 04-05-2008, 05:27 PM   #5
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
Look at the files in /etc/yum.repo.d

You should see URL info there.
Old 04-05-2008, 08:35 PM   #6
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,487

Rep: Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627
Be careful about upgrading MySQL 4 -> 5. The versions are NOT completely compatible on the database level. Search for some documentation about it. I forgot which problems it exactly gave, but one of them had to do with passwords.

Old 04-06-2008, 09:11 AM   #7
LQ Guru
Registered: Jan 2001
Posts: 24,147

Rep: Reputation: 229Reputation: 229Reputation: 229
I ran MySQL 5.0.x on CentOS 4.X without problems but downloaded the RPM's directly from MySQL's site to install from, not yum. 5.0.45 ran without problems, which at the time was the latest stable version available from MySQL in RPM format.
Old 04-08-2008, 07:35 AM   #8
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
I finally found that there is an option in the repo definition files to disable a given repo. [centosplus] by default contains the line enabled=0, so I commented it out and now yum shows me the Mysql 5 packages and lets me upgrade Mysql to that version.

Thanks a lot to you all for your suggestions.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI for mySQL John_Emad Programming 9 11-14-2006 03:30 AM
Upgrade to MySQL-5.0.18 breaks PHP mysql functions MarkVickers Slackware 5 05-03-2006 12:10 AM
MySQL GUI Ellops Linux - Software 2 02-23-2006 06:50 PM
php-mysql dependancy problem after nitemare mysql upgrade. RHEL4 andrewc Red Hat 1 01-03-2006 04:16 PM
mysql 4.0.24 to mysql 4.1.12 upgrade problem tuxrules Slackware 7 08-13-2005 06:43 PM

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration