The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Upgrade and Backup Advice

Discussion in 'Data Protection' started by Doug E, Nov 1, 2007.

  1. Doug E

    Doug E Well-Known Member

    Joined:
    Aug 17, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    I want to upgrade MySQL from 4.1 to 5.x

    I read on the forums that CPanel does not do this automatically.

    Can anyone recommend a good thread aimed at helping a noob with this? (Yes Ive searched and will continue to do so.)

    Also I want to backup my server in case I mess everything up. Whats the best way to manually backup so I can restore every server setting exactly as it was before I do this?

    Any links to a good help thread for either would be much appreciated.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you have automatic full server backups stored locally (not sent via FTP), the database data is already backed up in /backups. Should things go disastrously wrong, simply extract the contents of var/lib/mysql from that archive to /var/lib/mysql.

    As for the upgrade process, it's something I've done a couple of times before and it really isn't that bad - just have to remember to follow all the instructions.

    To set the MySQL version you want to use, go to WHM -> Server Configuration -> Tweak Settings -> MySQL(R) and select 5.0.

    There are instructions provided there to help you with the upgrade process after you change this setting.

    1. Go to WHM -> Software -> Update Server Software to actually upgrade MySQL.
    2. Go to WHM -> Software -> Apache Update. Simply rebuild Apache/PHP (no need to change any settings).
    3. If things aren't working right with MySQL in Perl Scripts (such as those used by cPanel/WHM or installed by your users), login to your server as root via SSH and run the following command:

    Code:
    /scripts/perlinstaller --force Bundle::DBD::mysql.
    Steps 1 and 2 are vital to the upgrade process. These steps should be performed in the order listed beginning with step 1 and ending with step 3.
     
  3. Doug E

    Doug E Well-Known Member

    Joined:
    Aug 17, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Ohh wow, the forums auto logged me out and I lost my first reply...



    Thanks David G for your quick reply. I was working on what you said last night but somehow manage to wipe out all my MYSQL databases.

    Also my main cpanel account no longer has X2 if thats any indicator as to what went wrong.

    I believe I followed all your steps properly. The only one I feel I could have messed up was step 2 apache rebuild.

    As I didnt see an option to actually 'rebuild' anything under 'Begin by selecting a profile to load:' I chose...
    When I found the maain software I use wasnt responding properly I ran the command...

    ...in ssh root. This had no effect and I chose to reboot my server. No effect either.

    I then discovered my MYSQL databases were missing.

    So I attmpted to restore them through CPanel-> backups. It would seem to upload them through Firefox, but once uploaded a new tab would open and it would only say on the page 'Restoring Database' but with no activity. I actually let it run all night as my database was quite large but nothing was waiting for me this morning.

    Also, under both of my CPanel subaccounts under 'Download a MySQL Database Backup' it lists no databases, of course, but says instead...


    How would I manually restore these databases through SSH?

    Im not sure how to exactly do this...

    ...and which commands to do it.


    And if this is all too much could you recommend a trustworthy person or company I can hire to patch things back together for me?

    Thanks in advance for any replies made :)
     
  4. Doug E

    Doug E Well-Known Member

    Joined:
    Aug 17, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Ive just discovered Im unable to create any new databases or users through cpanel. I click create database or create user and afterwards nothing appears.
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I'd definitely recommend submitting a ticket to your cPanel licensing provider regarding this issue.
     
  6. Doug E

    Doug E Well-Known Member

    Joined:
    Aug 17, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Would that be Cpanel itself or tech support at the company i lease the server from ?

    NM, Ive just read your sig.
     
    #6 Doug E, Nov 2, 2007
    Last edited: Nov 2, 2007
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Whoever you purchased your license from. To determine who this is, go to http://verify.cpanel.net and enter the primary IP address of your server. If it says "Direct License" then you should contact us directly (preferably via your cPanel Store account).
     
Loading...

Share This Page