Wamserver 64b vs 32b - MySQL Problem
Posted by: ArtieUK (---.1-2.cable.virginm.net)
Date: February 20, 2016 05:18PM

Hi All

I have recently tried to import SQL files into my Wampserver 2.5 32bit using the command line. I kept getting the error: 'ERROR 2006 (HY000): MySQL server has gone away', which I googled and the answer everyone produced was to increase the 'max-packet size' in my.ini. I did this and it had no effect, the problem remained. I narrowed the cause down to 'base64' encoded images in some of the insert statements which gave a line length in excess of 3634616 characters.

When I installed Wampserver 2.5 64bit, the problem went away!

I know that you recommend to use the 32bit version of Wampserver,but in this instance the 64bit solved my problem, although I'm not entirely happy with the solution.

Has anyone else come across this, can anyone shed more light on it?

TIA

Artie

Options: ReplyQuote
Re: Wamserver 64b vs 32b - MySQL Problem
Posted by: Otomatic (Moderator)
Date: February 20, 2016 05:54PM

Hi,

> I have recently tried to import SQL files into my Wampserver 2.5 32bit using the command line
These files was exported by what ?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Wamserver 64b vs 32b - MySQL Problem
Posted by: Otomatic (Moderator)
Date: February 20, 2016 06:46PM

Hi,

Maybe there are more explicit errors in mysql.log file.

But I do not think Google always tell the truth; there are a lot of errors in procedures Apache, PHP or MySQL in response to a question asked at Google.

For example, max-packet size does not exist in my.ini parameters, but... max_allowed_packet exists.
And this parameter can exist in multiple copies in the same my.ini file, but in different sections.
- In [wampmysqld] or [wampmysqld64] section
For mysql local client and this parameter has a value of 1M
max_allowed_packet = 1M
it needs to be increased.

- in [mysqldump] section
For dump (or export), the value is
max_allowed_packet = 16M
The vast difference between the two values may well explain the export poses no problem (limited to 16M), but the import is too restrained (limited to 1M).

This is very well explained in the MySQL documentation: [dev.mysql.com]

> I know that you recommend to use the 32bit version of Wampserver
The one and only way to use "real" 64bit is to use PHP 7 64bit with a 64bit Windows.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 3 time(s). Last edit at 02/20/2016 06:57PM by Otomatic.

Options: ReplyQuote
Re: Wamserver 64b vs 32b - MySQL Problem
Posted by: ArtieUK (193.109.196.---)
Date: February 23, 2016 08:29PM

Thanks Otomatic

You're quite correct, it is 'max_allowed_packet' not 'max-packet-size'. I should have read my post more carefully :-(

That said, I did change the size of 'max_allowed_packet', but it made no difference, I still got the errors.

The export was done from a mysql server running on 64bit ubuntu, using mysqldump, it produced a normal '.sql' file which I then copied to my windows laptop and tried to import into my wampserver installation.

When I uninstalled the Wampserver 32bit and installed the Wampserver 64bit, the import just worked even with max_allowed_packet' set at its default 1M.

This may be a red herring, but that was why I asked the question, trying to find an answer.

The problem was definitely being caused by the very long 'INSERT' rows, because when I edited the .sql file and shortened one of them, the error then showed at the next line that was too long!

Very strange!

Options: ReplyQuote


Sorry, only registered users may post in this forum.