How can I Increase the File upload size in phpmyadmin?

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
Hi All

Can anyone tell me what I need to do to increase the file upload size in phpmyadmin? At the moment it is set to: Max: 2,048KB

I need to restore a database that is about 80meg.

Thanks in advance.
 

drmike

Verified User
Joined
Mar 11, 2005
Messages
115
Location
Charlotte, NC
Newbee said:
Hi All

Can anyone tell me what I need to do to increase the file upload size in phpmyadmin? At the moment it is set to: Max: 2,048KB

I need to restore a database that is about 80meg.

Thanks in advance.

80megs needs to be done via the command line. I have three sites that have over 100meg databases and I wouldn't even think about putting them through phpmyadmin. Would take a lot longer to do anyway that way since it also have to go through PHP as well now. On the command line, they get inputted within a few seconds.

mysql - u username -p databasename < filename.sql

where:

username is the name of the MySQL user
databasename is the name of the database that you are importing into
filename.sql is the name of the backup database file.

If you really feel the need to change this setting though, try changing the upload_max_filesize setting within your php.ini file. I believe you need to restart Apache once you make these changes. I'd also change the max_execution_time as well since it's going to take longer than 30 seconds for your file to be processed.

Hope this helps,
-drmike
 

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
Hi again..

it says:

bash: mysqlfile_BDNAME1.sql: No such file or directory

Do I need to upload it somewhere first? If so please could you let me know the best place and way to do this?

Thanks in advance.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Yes, you have to upload it first. The OS is not a magician :) and has no idea where your file is.

Upload it to your own home directory (or /home/admin if you don't have a home directory, and do the import from there.

Then delete it.

Jeff
 

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
Hi Jeff, Thanks...

Now don't kill me... but how do I upload via ssh?

(In my 'innocence' i did wonder whether I would have got a prompt after typing the line of code I was given above (to browse to the file).. I kno I'm so naieve!)

Thanks very much as you've all been a great help!
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
You can upload it via ftp or scp.

For either you need a client program on your desktop.

Unless you use a Linux desktop as I do, I really can't help you with choices, but some people use WinSCP2 for windows.

You should never use FTP to the admin account.

Once you upload it, then I think the rest is fairly straightforward.

Jeff
 

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
I can use FTP, but where do I upload it? When I ftp to a site the 'highest' I can get is to these directories:

.htpasswd
logs
private_html
public_ftp
public_html
stats

I don't know what scp is?
I have 'putty' is that any use?

Sorry to b such a thicko!
 

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
Re: Re: How can I Increase the File upload size in phpmyadmin?

drmike said:
80megs needs to be done via the command line. I have three sites that have over 100meg databases and I wouldn't even think about putting them through phpmyadmin. Would take a lot longer to do anyway that way since it also have to go through PHP as well now. On the command line, they get inputted within a few seconds.

mysql - u username -p databasename < filename.sql

where:

username is the name of the MySQL user
databasename is the name of the database that you are importing into
filename.sql is the name of the backup database file.

If you really feel the need to change this setting though, try changing the upload_max_filesize setting within your php.ini file. I believe you need to restart Apache once you make these changes. I'd also change the max_execution_time as well since it's going to take longer than 30 seconds for your file to be processed.

Hope this helps,
-drmike

YES! it works thank you very much! :)

Basically I uploaded the file to the public_html directory, went there then carried out the command.

Thank you all that have helped!! :)
 

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
HELP!!!!!!!!!!!!

It worked on my smaller database yesterday but today (with an 80meg db) it's telling me this:


Enter password:
ERROR 1153 at line 141571: Got a packet bigger than 'max_allowed_packet'

do i change this in php.ini?
 
Last edited:

Chrysalis

Verified User
Joined
Aug 25, 2004
Messages
1,585
Location
uk
80 meg seems a bit big for phpmyadmin, do it in the command line for that size.
 

Newbee

Verified User
Joined
Feb 18, 2005
Messages
41
Got it to work in the end as I had to change the 'max_allowed_packet' to a higher figure (I think in my.cnf).

Thanks for all your help!
 

Luzash

New member
Joined
May 6, 2007
Messages
1
I'm having trouble myself, importing a file, but it's too big of course, but I'm pretty new to this and have no clue what I'm doing or how to do it.

Could anyone help me out here?
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Luzash, do you own your server? If so then you'll probably have to read up on MySQL documentation on how to import a database from the mysql command line (look for mysql documentation, here and elsewhere).

If you're a customer of a hosting company and have somehow found this thread through a google search or otherwise, and have decided to post here, then you'll have to have your hosting company help you.

Jeff
 
Top