FAQ
Hi, people !

I'm having a trouble with a program written in C.
This program try to create a record on a table, and it
receives the 2006 error code, "MySQL server has gone
away".

I've looked at the MySQL manual, searched the Web but
the solutions posted doesn't worked for me.

I've checked the mysqld, and it's up and running.

I've runned manually the same INSERT command of the
C program from mysql. It worked and created the record
succesfully.

Any help ? Sorry for my poor English :-)

Thanks in advance

Pablo

PD:

My MySQL's version is mysql-max-2.23.43 for Linux
(Intel libc6 systems), binary distribution,
downloaded from www.mysql.com I've created my tables
as InnoDB type.

The SQL command which fails is:

INSERT INTO Merchants ( mer_id, mer_name,
mer_enabled,mer_time_stamp, mer_mti_id, mer_view,
mer_legend1, mer_legend2, mer_legend3, mer_legend4,
mer_legend5,
mer_legend6, mer_legend7, mer_legend8,
mer_ext_int_type, mer_loc_id,
mer_last_update_time_stamp ) VALUES ( '00001115',
'Master Card e-commerce prueba', 1, 982006525, '',
'',
'', '', '', '', '', '', '', '', 2, '', 0 )

The table descriptions is:

CREATE TABLE Merchants (
mer_id CHAR (16) NOT NULL,
mer_name CHAR (30) NOT NULL,
mer_enabled SMALLINT(1) UNSIGNED
NOT NULL,
mer_time_stamp INTEGER NOT NULL,
mer_mti_id CHAR (4) NOT NULL,
mer_view CHAR (1) NOT NULL,
mer_legend1 CHAR (80) NOT NULL,
mer_legend2 CHAR (80) NOT NULL,
mer_legend3 CHAR (80) NOT NULL,
mer_legend4 CHAR (80) NOT NULL,
mer_legend5 CHAR (80) NOT NULL,
mer_legend6 CHAR (80) NOT NULL,
mer_legend7 CHAR (80) NOT NULL,
mer_legend8 CHAR (80) NOT NULL,
mer_ext_int_type SMALLINT NOT NULL,
mer_loc_id CHAR (4) NOT NULL,
mer_last_update_time_stamp INTEGER NOT NULL,
PRIMARY KEY ( mer_id )
)
TYPE = InnoDB

My /etc/my.cnf configuration file is as follows:

# Example mysql config file for medium systems.
#
# This is for a system with little memory (32M - 64M)
where MySQL plays
# a important part and systems up to 128M very MySQL
is used together with
# other programs (like a web server)
#
# You can copy this file to
# /etc/mf.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
(in this
# installation this directory is /usr/local/mysql/var)
or
# ~/.my.cnf to set user-specific options.
#
# One can in this file use all long options that the
program supports.
# If you want to know which options a program support,
run the program
# with --help option.

# The following options will be passed to all MySQL
clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
log-bin
server-id = 1

# Point the following paths to different dedicated
disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#set-variable = bdb_cache_size=4M
#set-variable = bdb_max_lock=10000

# Uncomment the following if you are using Innobase
tables
innodb_data_file_path = ibdata1:400M
innodb_data_home_dir = /usr/local/mysql/innodb/
innodb_log_group_home_dir = /usr/local/mysql/innodb/
innodb_log_arch_dir = /usr/local/mysql/innodb/
set-variable = innodb_mirrored_log_groups=1
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=5M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=16M
set-variable = innodb_additional_mem_pool_size=2M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not
familiar with SQL
#safe-updates

[isamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[mysqlhotcopy]
interactive-timeout


Conectate a Internet GRATIS con Yahoo! Conexión:
http://conexion.yahoo.com.ar

Search Discussions

  • Heikki Tuuri at Oct 28, 2001 at 8:04 am
    Pablo,

    if your application claims that MySQL server has gone
    away but you can see with the interactive client 'mysql'
    that it still is up and works if you submit new queries,
    then the problem is probably in your C application
    program.

    Please post the relevant C code here. Maybe some reader
    spots some error from it.

    Does the error come with the very first SQL statement
    you try to do from your C program?

    Regards,

    Heikki
    http://www.innodb.com
    Hi, people !

    I'm having a trouble with a program written in C.
    This program try to create a record on a table, and it
    receives the 2006 error code, "MySQL server has goneaway".
    I've looked at the MySQL manual, searched the Web but
    the solutions posted doesn't worked for me.
    I've checked the mysqld, and it's up and running.
    I've runned manually the same INSERT command of the
    C program from mysql. It worked and created the recordsuccesfully.
    Any help ? Sorry for my poor English :-)

    Thanks in advance

    Pablo
  • Pablo Monti at Oct 28, 2001 at 10:06 pm
    Yes, Heikki, the error come from the very first SQL
    statement of my C program

    Thanks for your help.

    Pablo

    --- Heikki Tuuri <heikki.tuuri@innobase.inet.fi>
    escribió: > Pablo,
    if your application claims that MySQL server has
    gone
    away but you can see with the interactive client
    'mysql'
    that it still is up and works if you submit new
    queries,
    then the problem is probably in your C application
    program.

    Please post the relevant C code here. Maybe some
    reader
    spots some error from it.

    Does the error come with the very first SQL
    statement
    you try to do from your C program?

    Regards,

    Heikki
    http://www.innodb.com
    Hi, people !

    I'm having a trouble with a program written in C.
    This program try to create a record on a table, and it
    receives the 2006 error code, "MySQL server has
    goneaway".
    I've looked at the MySQL manual, searched the Web but
    the solutions posted doesn't worked for me.
    I've checked the mysqld, and it's up and running.
    I've runned manually the same INSERT command of the
    C program from mysql. It worked and created the
    recordsuccesfully.
    Any help ? Sorry for my poor English :-)

    Thanks in advance

    Pablo


    ---------------------------------------------------------------------
    Before posting, please check:
    http://www.mysql.com/manual.php (the manual)
    http://lists.mysql.com/ (the list
    archive)

    To request this thread, e-mail
    <mysql-thread89215@lists.mysql.com>
    To unsubscribe, e-mail
    <mysql-unsubscribe-phm_mysql=yahoo.com.ar@lists.mysql.com>
    Trouble unsubscribing? Try:
    http://lists.mysql.com/php/unsubscribe.php
    Conectate a Internet GRATIS con Yahoo! Conexión:
    http://conexion.yahoo.com.ar

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmysql @
categoriesmysql
postedOct 27, '01 at 7:16p
activeOct 28, '01 at 10:06p
posts3
users2
websitemysql.com
irc#mysql

2 users in discussion

Pablo Monti: 2 posts Heikki Tuuri: 1 post

People

Translate

site design / logo © 2022 Grokbase