简体   繁体   中英

Unable to import a database through phpMyAdmin

I am trying to import a database into MySql using phpMyadmin. It is in the form of an sql. But after i create a new database and try to import the sql in it, the browser goes into the busy mode forever.

There are a few things that might help you guys understand things better.

  • The sql file i'm tryin to import is just 700k.
  • My MySql already has 30-40 databases.
  • My environment is local. ie WAMP 2.0
  • I'm working on windows

I also tried to import this sql through the query window but still it goes into busy mode.

Also, could there be any restrictions put in action by the mysql for the total no of databases?

Any help is hugely appreciated.

Check the following configurations in php.ini file

memory_limit
post_max_size
upload_max_filesize

if the limits are low then increase it, restart apache and mysql.

I think your issue might be either:

The import is trying to create the database, but you have already created it. In which case it should be dropping the database first then creating it.

Or

You haven't got a "use database" statment in your import script:

USE DATABASE_NAME;

MySQL can't restrict the amount of databases a database user can have, if you wanted that functionality you would need a control panel like cpanel / zpanel.

ensure your filesize is less then maxsize of file upload

在此处输入图像描述

you can open sql file in editor, like notepad++, and copy all its content into clipboard, then in phpmyadmin interface on create sql script paste it, and then on final step click on run script button.

It should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM