简体   繁体   中英

Error Importing Database in MAMP

I'm trying to import database (MySQL) in MAMP's PhpMyAdmin to injection in my table database 'city', The entry have 77000 data. It's post code with several information.

here my tables in my main DB:

captcha 
city
province
sub_country
....
....
etc

here current table what I mean:

in table city
city_id
poscode
kelurahan
kecamatan
city_name
provience_id

here my MySQL structure, postcode.sql (This is database for the import) :

insert  into `city`(`city_id`,`poscode`,`kelurahan`,`kecamatan`,`city_name`,`province_id`) values (1,'80571','Kedewatan','Ubud','Gianyar',1),(2,'80571','Lodtunduh','Ubud','Gianyar',1),(3,'80571','Mas','Ubud','Gianyar',1),(4,'80571','Peliatan','Ubud','Gianyar',1),(5,'80571','Petulu','Ubud','Gianyar',1)
..........................
..........................
..........................
until
(77013,'22461','Sibalanga','Adian Koting','Tapanuli Utara',33);

I'm trying to edit php.ini in /Applications/MAMP/bin/php/php5.4.10/conf/php.ini

With Some configuration, here:

max_execution_time = 0

But it's doesn't change anything. When I try import my database to injection in my table database 'city" in MAMP's PhpMyAdmin, Page just blank, And entry nothing insert in my table. (Max 32 MiB). What should I do, please Help.

Thanks in Advance.

First, make sure you're editing the correct file. Some systems and installers scatter several php.ini files across the disk and make it tough to make changes. View the output of phpinfo() and see what it has to say about your php configuration file.

The phpMyAdmin manual has good information and suggestions, which I'll summarize here:

  • Make changes to all of upload_max_filesize , memory_limit , and post_max_size in php.ini; they're all related and can affect upload limits.
  • Use $cfg['UploadDir'] to upload the file (through SSH, SFTP, or whatever other means you have) to a folder on the webserver, this will significantly improve the time it takes PHP to process the file (because it doesn't have to upload it first).
  • Use the command line client (this is my favorite, but I have good shell access to my server; UploadDir is next best in my opinion).
  • Use a program specifically designed to split big SQL files in to smaller ones and upload chunks at a time. The tool suggested in the link is BigDump , but there are others.

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