Skip to main content
Inspiring
January 16, 2007
Question

uploading large mysql database to a remote server

  • January 16, 2007
  • 5 replies
  • 410 views
Hi,

This is about uploading a .sql database that is beyond the limits of phpmyadmin, which I've been using up to now. I love phpmyadmin, it makes things so simple. But I understand that there are limits to it. Can I tweak the phpmyadmin to take larger file sizes? Is there a good alternative? All suggestions appreciated. Thanks.

Mike
This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

hconnorjrAuthor
Inspiring
January 17, 2007
Yes, the notion of increasing the memory limit size affecting performance especially with regard to all the forms on the server had occurred to me, but hearing it from you, David, makes me even more wary. I'll give it a try and let you know my results. As always, thanks.
Inspiring
January 17, 2007
hconnorjr wrote:
> Thanks. Both solutions sound great. I think I'll try yours first, David. Is
> there any problem with just permanently increasing the size php permits for
> file uploads?

The short answer is: I don't know. File uploads are stored originally in
a temporary file, so you need to make sure that you have plenty of free
disk space if you're going to increase the maximum upload size. Memory
limits may also affect performance/reliability. Another thing to
consider is that increasing the maximum size of post data affects all
forms on your server.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
hconnorjrAuthor
Inspiring
January 16, 2007
Thanks. Both solutions sound great. I think I'll try yours first, David. Is there any problem with just permanently increasing the size php permits for file uploads? I found this on another site:

PHP - Maximum allowed size for uploaded files - Maximum size of POST data

In order to upload large files to your server with PHP, you need to change 2 parameters in php.ini

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M

; Maximum size of POST data that PHP will accept.
post_max_size = 50M

The first setting changes the maximum file size for uploads. This is a pretty obvious setting.
The second setting changes the maximum POST request size. Since you post your files to the server, this must be changed too in order to allow uploads for big files.

Thanks,
Mike

Inspiring
January 16, 2007
hconnorjr wrote:
> This is about uploading a .sql database that is beyond the limits of
> phpmyadmin, which I've been using up to now. I love phpmyadmin, it makes things
> so simple. But I understand that there are limits to it. Can I tweak the
> phpmyadmin to take larger file sizes?

The 2MB limit isn't actually imposed by phpMyAdmin, but by the maximum
size PHP permits for file uploads. If you have control over the server,
you can change the maximum upload size temporarily. Other alternatives
are to upload the database table by table, or to do what Gareth suggests.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Inspiring
January 16, 2007
You could always upload the sql for the database to the server, then create
a small script to open the file, read it line by line and execute the sql,
to create the database. That way you have no limits.

--
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.