Importing Large SQL File into MySQL Database in Ubuntu 18.04

You were importing a large SQL file into a MySQL database and you encountered this error: You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit. Fret not.

Here is the list of steps to accomplish the task:

1. Open the file php.ini in the directory /etc/php/7.2/apache2.

$ sudo gedit /etc/php/7.2/apache2/php.ini

2. Look for the following lines and change their values to the ones on their right.

upload_max_filesize 100M
post_max_size 100M
max_execution_time 500
max_input_time 500

3. Save the changes.

4. Restart Apache.

$ sudo service apache2 restart