Web Hosting Talk







View Full Version : Importing Mysql dump created by phpMyadmin


smartcard
01-29-2008, 08:04 AM
I have a 3.5mb mysql data file in dump.sql.tz format this file was created (exported) by phpMyadmin.

The problem is I can not import this file using phpMyadmin since it is not allowing this file size.

How can I import this file using ssh/shell?

AdminForces
01-29-2008, 10:28 AM
As I know file upload size (file importing) is controlled in PHP's configuration file, not the script's. You'll have to edit the php.ini file for your installation and change the upload_max_filesize directive to a larger value (the default is 2MB). Keep in mind that there's another variable called post_max_size that you might need to change depending on how big a file you want to upload (the default is 8MB). And the last one value which should be increased is 'memory_limit'. Try to set these values to, for example 16M and check this one more time.
If you need to import database manually, I guess, you can do it with 'mysql' command. Something like this:

# gunzip dump.sql.tz
# mysql -u<USER> -p<PASSWORD> <DATABASE_NAME> < dump.sql

smartcard
01-29-2008, 10:35 AM
Thanks for your info.

I got the import done using BigDump, a single PHP available for this purpose.

webcs
01-29-2008, 01:22 PM
Yes correct, 3.5 megs is NOT large when it comes to phpmyadmin and it should do it fine if the server php settings are setup correctly.

phpmyadmin does however have an upper bound where you do need to use a root command to install a database. Works fine for small db's though.

dprundle
01-29-2008, 04:05 PM
You can backup and import using the command line mysql utility. phpmyadmin can support larger files, but it hiccups on them frequently (in my experiences)

webcs
01-29-2008, 04:20 PM
You can backup and import using the command line mysql utility. phpmyadmin can support larger files, but it hiccups on them frequently (in my experiences)

Yes it theoretically supports larger files, however, in actuality as this user says is hickups on them. IE, it has a hard time restoring large things.

One way around this is to try to restore tables one by one, that works. Or ask the host to do a command line restore, which any host should do.