How to re-install MySQL in cPanel server

You can re-install MySQL on cPanel server by following the technique described below,
Firstly you need to know the SQL rpms that were set up on your server. For that run the following command.

rpm -qa | grep -i mysql

Then remove the required MySQL rpms on the server using yum command. You can do that by mentioning the following yum instructions.

yum remove MySQL55-shared-5.5.37-2.cp1136.x86_64
yum remove MySQL55-devel-5.5.37-2.cp1136.x86_64
yum remove MySQL55-client-5.5.37-2.cp1136.x86_64

Then delete the MySQL PID file(s) using this command:

rm -f /var/lib/mysql/*.pid

At last you need to install cPanel suitable MySQL rpms, this can be done using only one command.

/scripts/check_cpanel_rpms --fix

Now MySQL will be re-installed.