Kindly follow the steps to update Mysql using WHM panel:

1. Log into WHM via root user.
2. Find Easy Apache from the top left search box
3 Select Easy Apache (Apache Update)
4. On the next screen, you may see the current Apache configuration (current profile) under the previous configuration. However, the mouse over gear icon Customize Profile located under Action column.
5. You will see Apache version screen as shown below:
6. At next stage, you will see the screen to select the PHP Version.
7.Select the PHP version you would like to upgrade and click on Next Step.
8. At next stage, you will see the screen to select the PHP Version.
9. Select the PHP version you would like to upgrade and click on Next Step.
10. While using the PHP upgraded version, it is not necessary to make changes at next 2 stages, Short Options List and Exhaustive Options List.
11. Go to Next Step for Save and Build.

Similarly, If you need to upgrade MySQL on your cPanel, simply choose the option as below:
Home »Software »MySQL/MariaDB Upgrade. If you don't see MySQL upgrade option run upcp
Instead of using the hostname “localhost”, use an IP address in your MySQL connection string.