Can't import database through phpmyadmin file

2019-01-10 03:38发布

I have been trying to import Database through phpMyAdmin. My database file is a.sql and it's size is 1.2 GB I am trying to import this on local and phpMyAdmin is saying:

You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

Please help I really need this to work.

12条回答
该账号已被封号
2楼-- · 2019-01-10 03:42

Use command line :

mysql.exe -u USERNAME -p PASSWORD DATABASENAME < MYDATABASE.sql

where MYDATABASE.sql is your sql file.

查看更多
一夜七次
3楼-- · 2019-01-10 03:47

to import big database into phpmyadmin there are two ways 1 increase file execution size from php.ini 2 use command line to import big database.

查看更多
对你真心纯属浪费
4楼-- · 2019-01-10 03:57

You no need to edit php.ini or any thing. I suggest best thing as Just use MySQL WorkBench.

JUST FOLLOW THE STEPS.

Install MySQL WorkBench 6.0

And In "Navigation panel"(Left side) there is option call 'Data import' under "MANAGEMENT". Click that and [follow steps below]

  1. click Import Self-Contained File and choose your SQL file
  2. Go to My Document and create folder call "dump"[simple].
  3. now you ready to upload file. Click IMPORT Button on down.
查看更多
我命由我不由天
5楼-- · 2019-01-10 03:57

for ubuntu 14.04 use this:

  • 1- open php.ini using gedit or nano:
  • sudo gedit /etc/php5/apache2/php.ini
  • 2- find 'upload_max_size' then replace this single line with these lines:
  • max_execution_time = 259200 max_input_time = 259200 memory_limit = 1000M upload_max_filesize = 750M post_max_size = 750M
  • 3- save php.ini and close editor
  • 4- restart apache2:
  • sudo service apache2 restart
  • 5- now open
  • localhost://phpmyadmin/
  • in browser and uplaod your database.sql

    查看更多
    Explosion°爆炸
    6楼-- · 2019-01-10 03:58

    You have three options:

    • Use another way to get the file on the server, and use a mysql client on the server
    • Use another client to connect to the server and load the data
    • Change your PHP settings to allow such huge files. Don't forget to increment the execution time as well.
    查看更多
    一纸荒年 Trace。
    7楼-- · 2019-01-10 03:59

    Here is what I've done:

    1. Gone to my XAMPP installed directoy C:\xampp\php
    2. Open the "Configuration Settings" file named php.ini using your text editor, preferably you can also you Notepad for Windows machine.
    3. Somewhere nearby on line no 886, please update it to upload_max_filesize = 128M
    4. Similarly on line no 735 post_max_size = 128M
    5. On line no 442 max_execution_time = 300
    6. On line no 452 max_input_time = 60
    7. Restart your Apache from either XAMPP Control Panel or using CMD in Windows https://stackoverflow.com/a/6723485/969092

    Done!

    查看更多
    登录 后发表回答