UBB.Dev
Posted By: Slawek_L Next question, upload *.sql file - 05/04/2003 1:05 AM
How uplad database file *.sql, which has 15MB ?
PhpMyAdmin refuses this operation, and gets alert "time out". It's possible to upload this file??
Posted By: Dave_L_dup1 Re: Next question, upload *.sql file - 05/04/2003 1:29 AM
Do you have shell access, and if so, can you run mysql from the shell?

Alternatively, I know that newer versions of phpMyAdmin can export to a .sql.gz (gzip-compressed) file. I don't remember if .sql.gz import is also supported. But a .sql.gz would probably be 10% the size of an .sql file, which might solve the problem.
Posted By: JoshPet Re: Next question, upload *.sql file - 05/04/2003 1:30 AM
The php.ini file of your PHP setup controls how big a file you can upload.

If you can't do it at a shell... open in text editor and split it into smaller pieces. And either upload or copy paste them into phpMyAdmin.
Posted By: Slawek_L Re: Next question, upload *.sql file - 05/04/2003 4:05 AM

Do you have shell access, and if so, can you run mysql from the shell?
I havent access to a shell
Alternatively, I know that newer versions of phpMyAdmin can export to a .sql.gz (gzip-compressed) file. I don't remember if .sql.gz import is also supported. But a .sql.gz would probably be 10% the size of an .sql file, which might solve the problem.
[b] It good idea, I try it tomorrow, now I'm going sleep, it 4 AM
Posted By: JoshPet Re: Next question, upload *.sql file - 05/04/2003 4:25 AM
I *think* the default filesize limit in php.ini is usually 2 MB.

Look at a phpinfo() file to know for sure.
Posted By: dimopoulos Re: Next question, upload *.sql file - 05/04/2003 11:58 PM
Or what you can do (the hard way - I had to do it once) you open the file in notepad and then use phpmyadmin to dump 3000 rows per time. It also depends on the host and how fast they can process the data. Linux hosts can dump around twice as many rows as a windows based host.
Posted By: JoshPet Re: Next question, upload *.sql file - 05/05/2003 1:31 AM
I've done that on many occations when I've transfered someone and did not have access to the shell.

I always play with how many rows it can handle at a time. My usual average is 6000 until you get to the post table.... then 5000 rows at a time is safer.
Posted By: navaho Re: Next question, upload *.sql file - 05/05/2003 8:42 PM
FTP it up. Then if I recall PHPMyAdmin can import a file on the local file system. If it can't then it wouldn't be but a 10 minute job to write a php script to import it for you.
Posted By: JoshPet Re: Next question, upload *.sql file - 05/05/2003 11:29 PM
I'm not aware of a way to import locally, but you're right, that would be a fairly easy phpMyAdmin hack.
Posted By: Dave_L_dup1 Re: Next question, upload *.sql file - 05/06/2003 12:18 AM
I found this. I'm not sure what version of phpMyAdmin that applies to.

--- edit ---

Here's the full description from the phpMyAdmin 2.4.0 manual:

[]$cfg['UploadDir'] string

The name of the directory, ending with a slash, where SQL files have been uploaded by other means than phpMyAdmin (for example, ftp). Those files are available under a drop-down box when you click the database name, then the SQL tab.

Please note that the file names must have the suffix ".sql".

This feature is useful when your file is too big to be uploaded via HTTP, or when file uploads are disabled in PHP.

Please note that if PHP is running in safe mode, this directory must be owned by the same user as the owner of the phpMyAdmin scripts.[/]
Posted By: JoshPet Re: Next question, upload *.sql file - 05/06/2003 12:41 AM
Doah!

RTFM.

Dave_L you amaze me sometime. I always called you Eagle Eye.... but really your attention to detail comes in handy.

I'm going to play with that. That'll come in handy.... and this should solve Slawickys problem.
Posted By: Dave_L_dup1 Re: Next question, upload *.sql file - 05/06/2003 12:46 AM
Well, I am a Kahuna.

Acually, I didn't find that in the manual, although I vaguely remember seeing it before, and forgetting about it. I spent about 30 minutes digging through posts at that forum before I came across it.
Posted By: JoshPet Re: Next question, upload *.sql file - 05/06/2003 12:55 AM
Kahuna is better than a banana peel.

Maybe your title should be "Eagle Eye".
Posted By: omegatron Re: Next question, upload *.sql file - 05/08/2003 3:47 AM
I am never going to get used to mine. I think me posts two much. I was code monkey then coder now hacker. At least I have a few hundred more posts till the next one.
Posted By: navaho Re: Next question, upload *.sql file - 05/08/2003 7:37 PM
I can fix yours like I fixed Josh's!
© UBB.Developers