Mysql error with Xampp – script timeout passed

Error

script timeout passed, if you want to finish import, please resubmit the same file and import will resume.

Solution

Method – 1 – import using Mysql command

set PATH=%PATH%;C:\xampp\mysql\bin

$ mysql -u root -p database_name < example.sql

Method – 1 – import using PHPMYADMIN

Here’s an example snippet with these settings in a php.ini file:

file_uploads = On
upload_max_filesize = 2M
post_max_size = 8M
max_execution_time = 300
max_input_time = 600
memory_limit = 256M

mysqli.allow_local_infile = On
mysqli.default_socket = /path/to/mysql.sock

error_reporting = E_ALL
  1. Max Upload Size in phpMyAdmin:
    • Log in to phpMyAdmin.
    • Click on the “Import” tab.
    • Below the file upload field, phpMyAdmin displays the maximum allowed file size. Ensure that this limit is appropriate for your needs.
  2. PHP Settings (Modify these in your php.ini or .htaccess file):
    • upload_max_filesize: Specifies the maximum size of uploaded files. Ensure it’s set to a value that allows the size of the files you want to upload.
    • post_max_size: Sets the maximum size of POST data that PHP will accept. It should be larger than upload_max_filesize to accommodate the entire POST request.
  3. phpMyAdmin Configuration (Modify these in phpMyAdmin’s configuration file config.inc.php):
    • Open the config.inc.php file, which is typically located in the phpMyAdmin installation directory.
    • Locate and adjust the following settings:
      • $cfg['UploadDir']: This setting specifies the directory where phpMyAdmin should store uploaded files. Make sure it’s a valid directory path, and the web server has write permissions to it.
      • $cfg['SaveDir']: This setting specifies the directory where phpMyAdmin should save exported files. Ensure it’s a valid directory path, and the web server has write permissions to it.
  4. MySQL Settings:
    • Ensure that your MySQL server allows for large file imports. You may need to adjust the MySQL server’s configuration settings, such as max_allowed_packet, to accommodate large imports.
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x