-1

This question already has an answer here:

I need to import my Live site into localhost for testing,

DB size - 1.4GB & Root Folder Size - 1.2 GB

How can I import large size of SQL file into DB?

DB Import Error: You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.

marked as duplicate by Fabian Schmengler, liyakat, benmarks Jul 4 '17 at 8:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    @TejabhagavanKollepara : My issue regard importing not exporting. – user51361 Jun 23 '17 at 10:22
0

Please compress the database in sql.gz format :

mysqldump -u(username) -p(pwd) | gzip > testname.sql.gz
  • after compressed how to import? – user51361 Jun 23 '17 at 10:19
  • after compressing of sql.gz format , you can import the database by the following query zcat filepath/test.sql.gz | mysql -u(username) -p(pwd) databasename – Raghu Jun 23 '17 at 10:21
  • where i can run this query – user51361 Jun 23 '17 at 10:22
  • what do you use ubuntu or windows – Raghu Jun 23 '17 at 10:31
  • 2
    After compression what is the procedure? – user51361 Jun 23 '17 at 10:54
0

Try below steps for large database import in local mysql server:

  1. Open the command window.
  2. Type the path of your mysql bin directory and press Enter.
  3. Paste your SQL file inside the bin folder of mysql server.
  4. Create a database in MySQL, for example "testdb".
  5. The run the below command:

    mysql -u root -p database_name < filenane.sql
    

    For example if database_name="testdb" ; filename= livedb.sql then command look like as shown below:

    mysql -u root -p testdb < livedb.sql
    
  • could you pls explain your point 2 – user51361 Jun 23 '17 at 10:26
  • mysql.exe directory path as /wamp/bin/mysql/mysql5.7.9/bin for wamp sever. – Prasanta Hatui Jun 23 '17 at 10:31
  • mysql -u root -p testdb < livedb.sql after this asked password, i can't give any password – user51361 Jun 23 '17 at 10:39
  • just press enter if you do not have any password – Prasanta Hatui Jun 23 '17 at 10:42
  • after completion may i get ant success notification? – user51361 Jun 23 '17 at 10:48