List:MySQL on Win32« Previous MessageNext Message »
From:Paul DuBois Date:August 2 2002 3:25pm
Subject:Re: "2006 - MySQL server has gone away"
View as plain text  
At 16:49 +0200 8/2/02, Doru-Catalin Togea wrote:
>Hi all!
>
>PART 1
>------
>
>I have put MySQL to a heavy task and it dies out with the "2006 - MySQL
>server has gone away" error message, when interfacing it by means of
>MySQL-Front. My goal is to put the whole Bible in mysql. To this purpose I
>have generated an sql script using python, which creates a table and then
>inserts the text of the Bible, verse by verse, into it.
>
>My script goes like this:
>
>	---------------------------------------
>use test_bibles;
>drop table nkj;
>create table nkj (book varchar(3), chapter int(3), verse int(3), txt
>blob);
>insert into nkj values
>('Gen',1,1,'In the beginning God created the heavens and the earth. '),
>('Gen',1,2,'The earth was without form, and void; and darkness [was] on
>the face of the deep. And the Spirit of God was hovering over the face of
>the waters. '),
>('Gen',1,3,'Then God said, "Let there be light"; and there was light. '),
>('Gen',1,4,'And God saw the light, that [it was] good; and God divided the
>light from the darkness. '),
>
>	<skip>
>
>('Rev',22,20,'He who testifies to these things says, "Surely I am coming
>quickly." Amen. Even so, come, Lord Jesus! '),
>('Rev',22,21,'The grace of our Lord Jesus Christ [be] with you
>all. Amen. ')
>	---------------------------------------

The problem here is probably that you're exceeding the maximum query
size, which is 1MB by default.  I'd guess that the total size of your
query is, oh, 6MB or so.  You can try a couple of approaches:

- Split up the verses and load only some of them at a time.  Say, 66
queries to load the verses for one book at at time.
- Bump up the value of the max_allowed_packet variable.  You'll need to
do this for both the client and the server.

The first alternative is probably easier.


>
>There are more then 31.000 rows to be inserted. Is that a problem? Should
>I use a special kind of tables? Currently my table is a myISAM table
>(whatever that is).
>
>I am running version 3.23.51-max-nt on win 2000 Pro.
>
>I have tried my script with only a few rows (like 50) and it works.
>
>PART 2
>------
>
>I tried to run my script as a batch job from the command line, but I
>experience problems connecting to mysqlc:
>
>	c:\mysql\bin>mysqlc -h localhost -u catalin -p <
>../scripts/nkj.sql
>	Enter password: ****************
>	ERROR 1045: Access denied for user: 'catalin@localhost' (Using
>password: YES)
>
>because, I am not prompted for my password, and the password used by
>default obviously does not work. How do I configure my user so that I'll
>be able to run this batch jobb?
>
>I can connect this way:
>
>	c:\mysql\bin>mysqlc -u catalin -p
>	Enter password: *************
>	Welcome to the MySQL monitor.  Commands end with ; or \g.
>	Your MySQL connection id is 66 to server version: 3.23.51-max-nt
>
>	Type 'help' for help.
>
>	mysql>
>
>but then I do not know how to run the batch job, while at the mysql
>prompt.
>
>I appreciate if you can help.
>
>Best regards,
>Catalin
>
>
>
>
>	<<<< ================================== >>>>
>	<<     We are what we repeatedly do.      >>
>	<<  Excellence, therefore, is not an act  >>
>	<<             but a habit.               >>
>	<<<< ================================== >>>>

Thread
"2006 - MySQL server has gone away"Doru-Catalin Togea2 Aug
  • Re: "2006 - MySQL server has gone away"Paul DuBois2 Aug
  • Re: "2006 - MySQL server has gone away"Paul DuBois2 Aug
    • Re: "2006 - MySQL server has gone away"Doru-Catalin Togea4 Aug