Import database even if it exceeds the limit size

2019-02-16 01:34发布

问题:

I've noticed that MySQL accepts only 2,048kb size of database but mine is 3.45mb. Does anyone know how to import the database? I'm only using phpmyadmin.

回答1:

Use command line interface to do the import . I don't think there is such small limit for database size in MySQL . From MySQL documentation SIZE LIMITS

The limit may be if you are using phpmyadmin which may limit file upload size according to settings specified in php.ini file

Syntax

   $ mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql}

If you want do import using phpmyadmin change settings in php.ini file

post_max_size = 10M 
upload_max_filesize = 10M 


回答2:

Here are simple steps:

  1. Open .sql file
  2. Select All (ctrl + A)
  3. Copy All
  4. Goto PhpMyAdmin
  5. Select DATABASE
  6. Open SQL tab and PASTE

Now wait for sometime.....



标签: mysql size limit