cpanel custom mysql

Backup all cPanel mysql DB:
mkdir /root/dbbackups

touch /root/dbbackups/list
for db in `mysql -e 'show databases' |awk '{print $1}' | grep -v Database` ; do

mysqldump --add-drop-table $db > /root/dbbackups/$db.sql && echo $db >> list
done

Set unmanaged:

/scripts/update_local_rpm_versions –edit target_settings.MySQL50 unmanaged
/scripts/update_local_rpm_versions –edit target_settings.MySQL51 unmanaged
/scripts/update_local_rpm_versions –edit target_settings.MySQL55 unmanaged
/scripts/update_local_rpm_versions –edit target_settings.MySQL56 unmanaged

Get new mysql:
http://httpupdate.cpanel.net/pub/mysqlinstall/
or http://httpupdate.cpanel.net/RPM/11.36/

if you are using cloudlinux:

cat /etc/yum.repos.d/cl-mysql.repo

[cl-mysql-5.5-stable]
name=cl-mysql-5.5-stable
baseurl=http://repo.cloudlinux.com/other/cl$releasever/mysqls/cl-mysql-5.5-stable/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CloudLinux

[cl-mysql-5.5-testing]
name=cl-mysql-5.5-testing
baseurl=http://repo.cloudlinux.com/other/cl$releasever/mysqls/cl-mysql-5.5-testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CloudLinux

[cl-mysql-5.6-stable]
name=cl-mysql-5.6-stable
baseurl=http://repo.cloudlinux.com/other/cl$releasever/mysqls/cl-mysql-5.6-stable/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CloudLinux

[cl-mysql-5.6-testing]
name=cl-mysql-5.5-testing
baseurl=http://repo.cloudlinux.com/other/cl$releasever/mysqls/cl-mysql-5.6-testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CloudLinux

[mysql-debuginfo]
name=mysql-debuginfo
baseurl=http://repo.cloudlinux.com/other/cl$releasever/mysqls/debug/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CloudLinux

[mysqclient]
name=mysqlclient
baseurl=http://repo.cloudlinux.com/other/cl$releasever/mysqls/mysqlclient/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CloudLinux

Leave a Reply

Your email address will not be published. Required fields are marked *