Importing large database (> 2 MB) using phpMyAdmin

If you try importing a mysql database backup file greater than 2 MB then you may receive an error – “No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.”. No Worries! you just need to make few changes to your php.ini file.

phpMyAdmin

Open php.ini file for editing:

1. Search for the text “upload_max_filesize”

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
upload_tmp_dir = "F:\software\xampp\tmp"

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

By default it is set to “2M”. Increase it to the maximum database size you want to upload.

2. Search for “post_max_size” and set it to a value greater “upload_max_filesize”


; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 8M

By default its set to “8M”. If you set “upload_max_filesize” > 8MB, say 10 MB but do not change the default “post_max_size” then phpMyAdmin will not allow upload a file greater than 8MB.

3. Search for “memory_limit” and set it to a value greater “upload_max_filesize” and “post_max_size”


; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M

By default “memory_limit” is set to “128M”.

Alternatively you can always use the MySql client program to upload large databases as below:


mysql -h hostname -u username -p databasename < wordpress.bak.sql

You will prompted to enter the “password”, enter it and press enter.

Leave a Comment

Back to top