Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

uploading large mysql database to a remote server

Participant ,
Jan 16, 2007 Jan 16, 2007
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
TOPICS
Server side applications
408
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 16, 2007 Jan 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.



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 16, 2007 Jan 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 16, 2007 Jan 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 17, 2007 Jan 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 17, 2007 Jan 17, 2007
LATEST
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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines