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.

Upgrade from MySQL4 to MySQL5. Will my scripts stop working?

Discussion in 'General Discussion' started by SuperBaby, Jun 19, 2009.

  1. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    331
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    I am currently running PHP 5.2.9 but I am still using MySQL4. I am running a lot of Perl and PHP scripts (that use MySQL database) in my websites. I would like to upgrade to MySQL5 but I worry that my scripts will stop working. Will my scripts stop functioning?

    After upgrading and if there are problems, can I switch back to MySQL4?
     
  2. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    Stop the MySQL service and take a backup of all your databases first. Then you can upgrade the MySQL . Note that you will have to recompile PHP after the upgrade.
     
  3. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    331
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    Thanks for the advice. But do you think it is likely my scripts will give problems after upgrading?
     
  4. pjman

    pjman Well-Known Member

    Joined:
    Mar 22, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New York
    Should be safe.

    I had the same predicament last year. Should I upgrade MYSQL from 4.0.x to 5, when I had to upgrade PHP to 5? I chose to keep MYSQL 4.0x. I'm about to upgrade next week. From all my research, I here that the jump to MYSQL 4.1x is a pain, but very do-able. And the leap to MYSQL 5, is easy.

    I haven't heard anyone report big problems with any scripts of any kind when moving to MYSQL to 5. If you hear anything, I would love to know.

    Good Luck....
     
  5. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
    Upgrading from mysql4 to mysql5 sometimes does cause problems with existing databases/scripts. Sometimes it goes smoother than others. Always make full backups just in case and you should be fine if something goes wrong.
     
  6. UBERHOST

    UBERHOST Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    California, US
    Adding to all of the above, I'd say that if you have scripts so outdated that they would be broken by upgrading MySQL, such scripts pose a security hazard to your server.
     
Loading...

Share This Page