How to import large sql file in phpmyadmin

前端 未结 20 1466
一向
一向 2020-11-29 17:04

I want to import a sql file of approx 12 mb. But its causing problem while loading. Is there any way to upload it without splitting the sql file ?

20条回答
  •  醉话见心
    2020-11-29 17:42

    Best way to upload a large file not use phpmyadmin . cause phpmyadin at first upload the file using php upload class then execute sql that cause most of the time its time out happened.

    best way is : enter wamp folder>bin>mysql>bin dirrectory then write this line

    mysql -u root -p listnames < latestdb.sql here listnames is the database name at first please create the empty database and the latestdb.sql is your sql file name where your data present .

    but one important thing is if your database file has unicode data . you must need to open your latestdb.sql file and one line before any line . the line is :

    SET NAMES utf8; then your command mode run this script code

提交回复
热议问题