How to upgrade MySQL from 5.1 to 5.5 in a cPanel server – command line option

MySQL is an open source RDBMS (Relational Database Management System) and its using the SQL Language(Structured Query Language). A database is a structured collection of data. SQL is the most commonly using language for database operations. By using SQL the database operations like adding, accessing and managing the database is very simple.

The MySQL upgrading steps is quite difficult normally. Like all software, the first steps for MySQL upgrade is taking the backup. Yes! it’s a very important step. In a cPanel installed server you can upgrade the MySQL verion from the command line itself by using the script “/scripts/check_cpanel_rpms”.

Here is short look for upgrading your MySql from 5.1 to 5.5 in a cPanel server.

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

==============================
20150512.022632] MySQL55-shared-5.5.42-2.cp1148
[20150512.022633] W Error Code: 7
[20150512.022633] E The following possible errors were detected while installing RPMs:
[20150512.022633] E %pre(MySQL55-server-5.5.42-2.cp1148.x86_64) scriptlet failed, exit status 1 install
[20150512.022633] The Administrator will be notified to review this output when this script completes
[20150512.022633] Hooks system enabled.
[20150512.022633] Checking for and running RPM::Versions ‘post’ hooks for any RPMs about to be installed
warn [check_cpanel_rpms] program “/scripts/postmysqlinstall” is not executable
warn [check_cpanel_rpms] program “/scripts/postmysqlup” is not executable
[20150512.022633] All required ‘post’ hooks have been run
==============================

I have fixed that above issue 😉

This could have happened if the hostname was changed with MySQL running. You could stop MySQL and remove / move the PID file before upgrading MySQL again as Vanessa suggested. EX:

[…] How to enable remote MySQL for an IP address on a cPanel server via CSF How to upgrade MySQL from 5.1 to 5.5 in a cPanel server – command line option How to allow mysql client to access remote mysql […]