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 centos 4.x failed

Discussion in 'General Discussion' started by lainard, Aug 11, 2007.

  1. lainard

    lainard Member

    Joined:
    Aug 10, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I try to upgrade mysql to 5
    and i got this error

    Preparing... ########################################### [100%]
    error: install: %pre scriptlet failed (2), skipping MySQL-server-5.0.27-0.glibc23

    anyone can give some help
     
  2. iCARus

    iCARus Well-Known Member

    Joined:
    Apr 8, 2003
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    We get the same error after we try to update 4.x to 5.x.

    /scrips/upcp --force does not fix this.

    If i try to run rpm -ivh <package> i get error :

    But DBI is updated !Anyone ?
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Which version of cPanel are you using?
     
  4. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    any solution on this problem? as i'm having this problem too
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The %pre scriptlet section is in charge of shutting down the MySQL process. Failure thus means the MYSQL process was unable to to be stopped, for what ever reason. Try stopping MySQL manually, then execute /scripts/mysqlup --force

    Also, entries in /etc/my.cnf can cause problems between versions. Rename /etc/my.cnf to /etc/my.cnf.back and try mysqlup --force.
     
  6. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    also check your /etc/fstab for the word bind on any lines, shouldn't be there and I found one server that had that and the same problem with upgrading.

    After removing bind from fstab either remount that specific partition or reboot the machine
     
  7. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    is there any other thing done on the %pre scriptlet other than shutting down the MySQL?
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The %pre section does the following:

    1. Looks for an init script for MySQL
    2. Uses the init script to stop MySQL
    3. Sleeps for 5 seconds

    Steps 2 and 3 are only performed if step 1 was successful. %pre looks in /etc/init.d and /etc/rc.d/init.d for an init script named mysql.
     
  9. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    but why the script fail then? i can execute 'service mysql stop' manually from console.
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Executing service mysql stop in a normal session is different than performing it in the middle of a software upgrade.

    Another item to check is selinux. Make certain it is set to either disable or permissive.
     
  11. Lucas

    Lucas Well-Known Member

    Joined:
    Feb 22, 2003
    Messages:
    125
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Around the world
    cPanel Access Level:
    Root Administrator
    I am having this god damn problem too. On 2 different VPS. I have tried renaming my.cnf, stopping mysql prior to upgrading and my selinux is disabled. It still throws that error.
     
    #11 Lucas, Feb 10, 2008
    Last edited: Feb 10, 2008
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Hmmm, is everyone else that is having problems in this thread also using a VPS? Perhaps it's a memory allocation error causing this.
     
  13. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    None of the servers I found this problem on were VPS systems, all were full fledged servers running 1 WHM/cpanel install and just hosting sites.
     
Loading...

Share This Page