How to import table in phpmyadmin? I got error of

2020-05-22 10:16发布

问题:

I want to import database in phpmyadmin but i got error like this... "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."

my file size is 4.8 mb,

please give me solution....

回答1:

Follow theses steps

Go to the PHP folder -> search for php.ini

Seach for the below line and change it according to your need.

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Restart the server to confirm changes.



回答2:

try to edit after change into php.ini :

upload_max_filesize = 10M 
post_max_size = 20M 
memory_limit = 128M

also change the value of max_execution_time

EDIT: if you want then do all that stuff with command line:

mysql -h[Host Name] -u[User Name] [Database Name]<[SQL File Name] -p

through this you will import the database..



回答3:

You need to edit the php.ini file for changing the file size. the line is

upload_max_filesize = 2M

You need to change the file size that you need to import.For ex: if you need to import a 10 mb file,then change it into

upload_max_filesize = 10M

Then restart your server.



回答4:

I had the same problem. Here is the solution:

you need to edit the variable for max_upload_size in php.ini file so do the following:

locate php.ini

it will show you the location of that file

enter the file by

sudo gedit /etc/php/7.0/apache2/php.ini

enter password

find the variable and edit the value to as much as you want save it and exit now restart your server service apache2 restart and done!!



回答5:

Copy the data from the file, put it into the sql tab of phpmyadmin, and press the "Go" button.



回答6:

You need to make sure that your file size options are set to suitable values in the correct file. On my system there are 3 files called php.ini inside /etc/php/7.0 (Linux Mint 18.1 Cinnamon) but only one of them is being used.

The instructions here tell you how to find which file to edit:

Create a file var/www/html/phpinfo.php. Paste this code into it and save it:

<?php phpinfo() ?>

Then in a browser navigate to http://localhost/phpinfo.php

This displays your php configuration, look for the option "Loaded Configuration File", it should be near the top of the page. This will give you the location of your php.ini file, on my system it's /etc/php/7.0/apache2/php.ini

Now open that file (don't forget to open it as root so you can save changes) and increase the allowed file size to a value larger than your sql file, for example:

upload_max_filesize = 20M

If that doesn't do the trick, you can try increasing the values for these settings also:

max_execution_time
max_input_time
memory_limit
post_max_size


回答7:

Increase the upload file size limit in the server. If you don't have access to it try breaking the file into parts, for different tables. Or you may use MySQL Dumper.



回答8:

I had the same problem with WAMP. I even tried changing the limit going back to php.ini for max_upload_limit but still it didn't work. I went back to my mac and tried on MAMP and i had no issues at all. BTW I figured out that... the max limit size set in WAMP is 2084KiB where as in MAMP is 32MiB. If you even refer to the documentation from PHP in the FAQ_16 it talks about the max_upload_limit in php.ini. Documentation.html#faq1_16 a very userful link is below: http://www.magentocommerce.com/wiki/magento_filesystem_permissions



回答9:

If you are using XAMPP in Ubuntu

Follow theses steps

/opt/lampp/etc/php.ini

Seach for the below line and change it according to your need.

; Maximum allowed size for uploaded files. upload_max_filesize = 2M



回答10:

In Ubuntu 18.04 apache2 does change the upload size on the below php.ini file :

root@xxxxxxxxxx:/etc/php/7.2/apache2# pwd
/etc/php/7.2/apache2
root@xxxxxx:/etc/php/7.2/apache2# vi php.ini 


回答11:

Open php.ini file

(Open xampp-control-panel. In front of Apache, there is a config button. Click on that and php.ini will be opened).

In php.ini there is upload_max_filesize=2M

update it to upload_max_filesize=10M (you can update it as per your requirement)

After this, you have to restart apache in xampp-control-panel