On Thursday 02 of December 2004 01:15, Michel RENON wrote:
> Hi,
>
> Here is my problem :
> I want to copy datas from an existing website to my local website.
> The website is a collection of images with thumbnails.
> With phpMyAdmin, i made an export of the image table and i have a 16 MB
> file 'image.sql' containing sql orders to create table and insert
> values.
>
> With phpMyAdmin of local website, I tried to execute that sql file but
> got errors related to memory allowed to php (2 MB max).
> I tried to modify 'memory_limit', 'upload_max_filesize' in
> "/etc/php.ini" but still got errors.
>
> So I tried with mysql tools.
> with "source /path/image.sql;" the table is created but i got the
> following error :
> ERROR 1153: Got a packet bigger than 'max_allowed_packet'
>
> I've seen threads in this list about same error, but I feel i'm in a
> wrong way...
>
> What would be a "good" way of doing that export/import of datas ?
> What to do if I want to upload bigger datas on the existing website ?
> (I only have a phpMyAdmin access)
>
> Sorry if the answer is obvious, but I'm new to MySQL, phpMyAdmin.
>
> My local config is PowerMac G4, Mac OS X 10.3.5, MySQL 4.0.21
>
> Thanks in advance
>
> Michel RENON

Hello!
I'm not familiar with mysql command-line tools. To fix 'max_allowed_packet' 
error edit 'my.cnf' file and set 'max_allowed_packet' to something bigger, 
and restart mysqld. Then using 'source /path/image.sql;' should work.
Also I have few tips about phpMyAdmin.
You should increase 'post_max_size' in your php.ini. A short quote from 
PHP manual:
> post_max_size integer
> Sets max size of post data allowed. This setting also affects file upload.
> To upload large files, this value must be larger than upload_max_filesize.
> If memory limit is enabled by your configure script, memory_limit also
> affects file uploading. Generally speaking, memory_limit should be larger
> than post_max_size.
If you use Apache the edit your httpd.conf and increase 'Timeout' value. If 
you use other web server, it should also have 'Timeout' directive in its 
configuration file.
And of course remember to restart your web server ;).
Then edit 'config.inc.php' in your phpMyAdmin directory, adjust 
$cfg['ExecTimeLimit'] and try to upload your file.
Myself I tried to upload 16MB file. The upload was successful but my web 
browser frozen when displaying result, as it is over 16 000 000 characters to 
display ;) and I have to kill its process. If your web browser process starts 
to use almost all your CPU, queries should be already executed.

--
Piotr Bogdan

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to