Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    43

    Question Upgrading MySql without GUI


    Hi,

    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.

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Try the following,
    Code:
    #yum --enablerepo=centosplus upgrade mysql*

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    43
    Thanks for the hint, but I get the following:

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

    It seems it's expecting the repository to be local! Any way around this?

  4. #4
    Just Joined! rybo's Avatar
    Join Date
    Jun 2006
    Location
    Latvia
    Posts
    12
    sudo yum upgrade mysql*
    or
    su
    yum upgrade mysql*

    not sure about this:
    --enablerepo=centosplus

  5. #5
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Quote Originally Posted by czamora View Post
    Thanks for the hint, but I get the following:

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

    It seems it's expecting the repository to be local! Any way around this?
    I'm not sure why yum would think the repository is local. You could just grab the rpms you need from the centosplus repository, scp them to your server and then upgrade using "rpm Uvh" or "yum localinstall".

  6. #6
    Just Joined!
    Join Date
    May 2006
    Posts
    43
    Does anyone know how does yum know where the repositories are located? I mean, how it translates a name like 'centosplus' into a complete url?

    Thanks a lot.

  7. #7
    Just Joined! rybo's Avatar
    Join Date
    Jun 2006
    Location
    Latvia
    Posts
    12
    I think it should be configured in /etc/yum.conf or something. I remember I have personally added few repositories for fedora. Check your configuration files.
    Possibly MySql won't upgrade to next version. Maybe you should remove your MySql files using the same yum, and then install it again to latest version.

  8. #8
    Just Joined!
    Join Date
    Aug 2006
    Posts
    20

    remote desktop

    You could also install VNC (very simple) and that would get you to a remote gnome or kde desktop on your server if you know how to do it from the GUI.

  9. #9
    Just Joined!
    Join Date
    May 2006
    Posts
    43
    Ok, finally I found out how to do it.
    The repositories are defined in the files stored in /etc/yum.repos.d
    In those files each repo has a section that includes the url where it is located.
    Furthermore, there is an option "enabled=0" which prevents that repo from being used by yum, and the section [centosplus] contained that line. So I commented it out, and now yum does show the Mysql 5 packages and lets me upgrade to them.

    I think the yum manual would need to include these details.

    Thanks a lot to you all for your suggestions.

Posting Permissions

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