Page 1 of 1

mysql/phpmyadmin import problems *newbie*

PostPosted: 26. April 2009 23:36
by roper1979
I'm currently tring to import a database - I'm running on a 'test rig' so all my sql/php is running on localhost.
The database is around 255mb.
I've edited php.ini so memory_limit, post_max_size & upload_max_filesize to 512.
The dump is no extended inserts.
I retrieve two tables, but then I get the error message "Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 255567249 bytes) in C:\xampp\phpMyAdmin\libraries\import.lib.php on line 269"
The offending line reads "$GLOBALS['import_text'] = substr($GLOBALS['import_text'], $size)"
$size is determined by $_Globals 'read_limit', and I can't find what determines the read limit.

What am I doing wrong?

Re: mysql/phpmyadmin import problems *newbie*

PostPosted: 26. April 2009 23:46
by Sharley
roper1979 wrote:I'm currently tring to import a database
How exactly are you doing this import?

roper1979 wrote:I've edited php.ini
Which php.ini file did you edit?
What version of XAMPP and OS please?

Re: mysql/phpmyadmin import problems *newbie*

PostPosted: 26. April 2009 23:54
by roper1979
I'm importing the database by using phpmyadmin to create the db, then selecting the db and using the import option on the right hand pane.
Partial import is left checked.

php.ini located in the \php folder.

OS is 32-bit XP with SP3, and I'm using xampp 1.7.1

Re: mysql/phpmyadmin import problems *newbie*

PostPosted: 27. April 2009 00:25
by Sharley
I take it you downloaded a big dump to your HD and are trying to import this dump into your new database created using phpMyAdmin.

From memory there is a size limit on the import sql file at around 65 megs.

You may have to split the file into smaller import chunks to import a 255 meg sql file.

Search Google as I believe there is an app that will perhaps allow importing large databases, again from memory - Try BigDump.
http://www.ozerov.de/bigdump.php

Re: mysql/phpmyadmin import problems *newbie*

PostPosted: 27. April 2009 00:57
by roper1979
I'm trying big dump, but it now appears that other stuff is going wrong... ;)
Big dump comes back with...
"Error at the line 3001: tAgents` VALUES (3011296,11,1000014,60001573,1,-18,2);

Query: tAgents` VALUES (3011296,11,1000014,60001573,1,-18,2);

MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tAgents` VALUES (3011296,11,1000014,60001573,1,-18,2)' at line 1"

what does 'near' mean?

Re: mysql/phpmyadmin import problems *newbie*

PostPosted: 27. April 2009 01:09
by Sharley
IMHO, when you create the dump you have to select the compatibility mode and again when you are importing.

http://dev.mysql.com/doc/refman/5.1/en/ ... -mode.html

Click on the little question marks in phpMyAdmin for the help docs.

Near means near line 1 but does not mean line 1.

Things to keep in mind are the versions of MySQL may be different from the dump to the import and this may give syntax errors in the sql file until this difference is corrected by editing the sql file or by the compatibly mode perhaps.