Upgrading MySQL on Cpanel Server

in

Problem

To upgrade the mysql on the cpanel server

Answer

  • The best method to use the cpanel /script/mysqlup to upgrade the mysql.
  • To upgrade the mysql from 4.0.x to 4.1.x you need to enable the mysql upgrade in the whm under tweak setting
        /scripts/upcp --force
        /scripts/mysqlup --force
        

when you upgrade you might enconter the following problems

  • I ran out of mirrors for MySQL. at /scripts/mysqlup line
    Delete the /root/.cpmylsqrpm and excute the

        rm /root/.cpmylsqrpm -rf 
        /scripts/upcp --force
        
  • Cannot load /usr/local/apache/libexec/libphp4.so into server: libmysqlclient.so.12: cannot open shared object file: No such file or directory
        ln -s /usr/lib/libmysqlclient.so.14 /usr/lib/libmysqlclient.so.12
        
  • If Apache gives error saying "child pid 23477 exit signal Segmentation fault (11)"
    recompile the apache with /scripts/easyapache which will rebuild the libphp modules again, which conflict with libmysqlcliet.so

Manual Method

      
wget -c http://dev.mysql.com/get/Downloads/MySQL-4.0/MySQL-server-4.0.20-0.i386.rpm/from/http://mirrors.develooper.com/mysql/
wget -c http://dev.mysql.com/get/Downloads/MySQL-4.0/MySQL-shared-compat-4.0.18-0.i386.rpm/from/http://interserver.net/mirror/mysql_mirror/
wget -c http://dev.mysql.com/get/Downloads/MySQL-4.0/MySQL-client-4.0.20-0.i386.rpm/from/http://mirrors.develooper.com/mysql/
service mysql stop
rpm -Uvh --nodeps MySQL-server-4.0.20-0.i386.rpm
rpm -Uvh MySQL-shared-compat-4.0.18-0.i386.rpm
rpm -Uvh MySQL-client-4.0.20-0.i386.rpm
      
service mysql stop
service mysql start
/scripts/postmysqlinstall

To fix the old(3.x) and new (4.1x) table permission problem run the following :

Related Links

Cpanel Net
Forum Cpanel
MySQL