Upgrading to MySQL 5.1 in cPanel is currently not the easiest thing in the world. I’ve seen guides detailing disabled various cPanel updates, hacking cPanel scripts and even installing your own 5.1 RPMs, all of which will probably end in tears at some point when cPanel runs one of its update scripts.
Heres the easiest and safest method I’ve found.
1. Edit cPanel update tree
Find CPANEL=release and replace with CPANEL=edge
2.Force a cPanel update
This should make sure all your dependencies and other cPanel related files are up to date before we upgrade MySQL.
3. Edit the main cPanel config
Find mysql-version=5.0 and replace with mysql-version=5.1
4. Run the MySQL update script and wait. It doesn’t echo any output so be patient.
5. Finally, check the update went well
You should get something like this
mysql Ver 14.14 Distrib 5.1.56, for unknown-linux-gnu (x86_64) using readline 5.1
6. Finally, you should rebuild Apache & PHP to get the new statically loaded libraries. If you don’t you may get MySQL library error
php: /usr/lib64/libmysqlclient.so.15: version `libmysqlclient_15′ not found (required by php)
Done! No nasty hacks, just pure cPanel scripts.