To optimize a MySQL database, follow these steps:

Step 1: Log in to cPanel.

Step 2: In the Databases section of the cPanel home screen, click on phpMyAdmin. The phpMyAdmin administration page will appear in a new window.

Step 3: In the left pane, click on the name of the database that you want to optimize. For example, the following image shows the example_wordpress database selected

Step 4: In the right panel, select the corresponding checkboxes for the tables within the database that you wish to optimize.

Step 5: In the ‘With selected’ list box, select ‘Optimize table’.

Now, phpMyAdmin will inform you whether or not the optimization process was successful.