Re: In wamp how can I import 35MB db - too big for phpmyadmin
Posted by:
darkroomsource
(---.or.wavecable.com)
Date: April 23, 2010 07:04PM
For any who've got the same situation as me,
I'm developing on WAMP, but uploading to an ISP where I can NOT change the configuration of PHP / MYSQL / Apache. Nor can I run the Mysql command line.
Open the import file in your favorite text editor, and break it up into pieces.
If you break between tables, you just save each section, and import each section separately.
If you have to break it in the middle of a table, you may need to change the "comma (,)" at the end of a line to a semi-colon, and copy the "INSERT". Like this:
-----------------------------------
INSERT INTO `country` (`countrycode`, `country`) VALUES
('ACA', 'Acadia'),
('AFG', 'Afghanistan'),
('ALB', 'Albania'),
('DZA', 'Algeria'),
('YEM', 'Yemen, Republic of'),
('YUG', 'Yugoslavia'),
('ZAR', 'Zaire'),
('ZMB', 'Zambia'),
('ZWE', 'Zimbabwe');
-----------------
becomes
-----------------
INSERT INTO `country` (`countrycode`, `country`) VALUES
('ACA', 'Acadia'),
('AFG', 'Afghanistan'),
('ALB', 'Albania'),
('DZA', 'Algeria');
INSERT INTO `country` (`countrycode`, `country`) VALUES
('YEM', 'Yemen, Republic of'),
('YUG', 'Yugoslavia'),
('ZAR', 'Zaire'),
('ZMB', 'Zambia'),
('ZWE', 'Zimbabwe');
-----------------------------------
I've only ever had to do this a few times in the past 15 years, but if I had to do it on a regular basis I would write some code to do it for me.
Hope this helps,
--Andy
<><