Introduction
cPanel & WHM version 88 introduced compatibility with MySQL® 8. At the time of installation, the current default version is MySQL® 5.7. This information will guide you to set up a new cPanel & WHM installation that uses MySQL® 8.
Procedure
Before performing the installation, cPanel & WHM will need to know that you want MySQL® 8. You will need to create a directory in the /root/ folder named cpanel_profile.
You can make a directory with this command in SSH:
mkdir /root/cpanel_profile
A file named cpanel.config will need to exist within /root/cpanel_profile that specifies the custom MySQL® version.
The full path to this file will be:
/root/cpanel_profile/cpanel.config
Add the following line to the file to configure the cPanel & WHM installation to use the specified MySQL® version:
mysql-version=8.0
You can quickly create this file and add the required line using this command:
echo "mysql-version=8.0" > /root/cpanel_profile/cpanel.config
Once this is complete, you can run the cPanel installation with the following command:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Note that this and more information regarding installation customization is available in our installation guide.