View Full Version : Problem importing MySQL db with PHPMyAdmin
20th February 2007, 11:04 PM
I'm trying to import a mysql db using phpmyadmin. But I get the following error:
ERROR: Unknown Punctuation String @ 6
<b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4592571 bytes) inI tried increasing the memory_limit to over 60M in php.ini (and restarting httpd) but I still get the same error.
The leads me to wonder if MySQL has a memory limit? If so how do I increase this?
21st February 2007, 03:47 AM
If you are trying to import a database that was exported with something like mysqldump (basically a big text file) i would use the command line instead of myphpadmin
-from the command line as root type 'mysql -p' and log in
-in mysql type 'create database foo' or whatever the name is and then exit
-back at the prompt type 'mysql -u root -p password foo < dumpfile.sql'
done deal. as far as memory limits in mysql, yes, there are buffer limits depending on the type of database (isam, innodb, etc) but you would have to look through your my.cnf to figure out which one may be causing the problem (there are many).
also keep this in mind, importing a database that was exported in, let's say, mysql4 might not import into a mysql5 server.
21st February 2007, 09:15 AM
Many thanks, the db was exported to .gz using phpmysql (MySQL 5) and is being imported using exactly the same setup.
I could use the command line, but I'd like to find out what this error is all about...?
21st February 2007, 10:05 AM
OK how do I uncompress localshost.sql.gz ?
1st March 2007, 06:42 PM
if its a standard gz file then you would use gunzip, something like the following command:
gunzip -cd localshost.sql.gz
which will leave you with localhost.sql (leaving localhost.sql.gz unchanged) and from there you should be able to pipe it into sql using the directions from my first post.
Note: backup localhost.sql.gz to a safe place before you start messing around with it, just in case.
4th March 2007, 03:10 PM
Hmmm... I tried that and get:$ gunzip -cd localhost.sql.gz
gunzip: localhost.sql.gz: not in gzip formatAny ideas?
6th March 2007, 06:02 PM
the -d switch is to decompress. gunzip does not use the -d switch since gunzip means decompress
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.