#2006 - MySQL server has gone away

Problems with the Windows version of XAMPP, questions, comments, and anything related.

#2006 - MySQL server has gone away

Postby Deuxe » 15. January 2013 02:52

Image

XAMPP Version: XAMPP 1.8.1
Operating System: Windows XP SP3

Well, I was normally using xampp the other day. The next day after i opened phpmyadmin, this error popped out. Good thing i had backups on everything. I tried the following solutions based on my google searches:

  • Restarted the pc (No effect)
  • Deleted the whole xampp folder and reinstalling it (No luck)
  • Changed "max_allowed_packet" to "100M" (Still no luck)

Here are my files:
MySQL Error Log --> mysql_error.log
Code: Select all
130115  9:02:43 [Note] Plugin 'FEDERATED' is disabled.
130115  9:02:43 InnoDB: The InnoDB memory heap is disabled
130115  9:02:43 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130115  9:02:43 InnoDB: Compressed tables use zlib 1.2.3
130115  9:02:43 InnoDB: Initializing buffer pool, size = 16.0M
130115  9:02:43 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist:
InnoDB: a new database to be created!
130115  9:02:43  InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
130115  9:02:43  InnoDB: Log file C:\xampp\mysql\data\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
130115  9:02:44  InnoDB: Log file C:\xampp\mysql\data\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
130115  9:02:44  InnoDB: Waiting for the background threads to start
130115  9:02:45 InnoDB: 1.1.8 started; log sequence number 0
130115  9:02:45 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130115  9:02:45 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130115  9:02:45 [Note] Server socket created on IP: '0.0.0.0'.
130115  9:02:45 [Note] Event Scheduler: Loaded 0 events
130115  9:02:45 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.27'  socket: ''  port: 3306  MySQL Community Server (GPL)
130115  9:22:41 [Note] Plugin 'FEDERATED' is disabled.
130115  9:22:41 InnoDB: The InnoDB memory heap is disabled
130115  9:22:41 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130115  9:22:41 InnoDB: Compressed tables use zlib 1.2.3
130115  9:22:41 InnoDB: Initializing buffer pool, size = 16.0M
130115  9:22:41 InnoDB: Completed initialization of buffer pool
130115  9:22:41 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130115  9:22:41  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130115  9:22:42  InnoDB: Waiting for the background threads to start
130115  9:22:43 InnoDB: 1.1.8 started; log sequence number 1595675
130115  9:22:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130115  9:22:43 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130115  9:22:43 [Note] Server socket created on IP: '0.0.0.0'.
130115  9:22:43 [Note] Event Scheduler: Loaded 0 events
130115  9:22:43 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.27'  socket: ''  port: 3306  MySQL Community Server (GPL)


Apache Error Log --> error.log
Code: Select all
[Tue Jan 15 09:02:39.031250 2013] [ssl:warn] [pid 2156:tid 224] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:02:39.890625 2013] [mpm_winnt:notice] [pid 2156:tid 224] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue Jan 15 09:02:39.906250 2013] [mpm_winnt:notice] [pid 2156:tid 224] AH00456: Server built: Aug 18 2012 12:41:37
[Tue Jan 15 09:02:39.906250 2013] [core:notice] [pid 2156:tid 224] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Jan 15 09:02:39.937500 2013] [mpm_winnt:notice] [pid 2156:tid 224] AH00418: Parent: Created child process 3040
[Tue Jan 15 09:02:40.937500 2013] [ssl:warn] [pid 3040:tid 1872] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:02:41.031250 2013] [mpm_winnt:notice] [pid 3040:tid 1872] AH00354: Child: Starting 150 worker threads.
[Tue Jan 15 09:22:29.140625 2013] [core:warn] [pid 3036:tid 224] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Jan 15 09:22:29.265625 2013] [ssl:warn] [pid 3036:tid 224] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:22:29.328125 2013] [mpm_winnt:notice] [pid 3036:tid 224] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue Jan 15 09:22:29.328125 2013] [mpm_winnt:notice] [pid 3036:tid 224] AH00456: Server built: Aug 18 2012 12:41:37
[Tue Jan 15 09:22:29.328125 2013] [core:notice] [pid 3036:tid 224] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Jan 15 09:22:29.328125 2013] [mpm_winnt:notice] [pid 3036:tid 224] AH00418: Parent: Created child process 3984
[Tue Jan 15 09:22:29.968750 2013] [ssl:warn] [pid 3984:tid 1872] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:22:30.031250 2013] [mpm_winnt:notice] [pid 3984:tid 1872] AH00354: Child: Starting 150 worker threads.
[Tue Jan 15 09:22:40.234375 2013] [core:warn] [pid 3188:tid 224] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Jan 15 09:22:40.375000 2013] [ssl:warn] [pid 3188:tid 224] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:22:40.437500 2013] [mpm_winnt:notice] [pid 3188:tid 224] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue Jan 15 09:22:40.437500 2013] [mpm_winnt:notice] [pid 3188:tid 224] AH00456: Server built: Aug 18 2012 12:41:37
[Tue Jan 15 09:22:40.437500 2013] [core:notice] [pid 3188:tid 224] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Jan 15 09:22:40.437500 2013] [mpm_winnt:notice] [pid 3188:tid 224] AH00418: Parent: Created child process 952
[Tue Jan 15 09:22:41.078125 2013] [ssl:warn] [pid 952:tid 1872] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:22:41.125000 2013] [mpm_winnt:notice] [pid 952:tid 1872] AH00354: Child: Starting 150 worker threads.
[Tue Jan 15 09:23:07.593750 2013] [core:warn] [pid 3624:tid 224] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Jan 15 09:23:07.734375 2013] [ssl:warn] [pid 3624:tid 224] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:23:07.781250 2013] [mpm_winnt:notice] [pid 3624:tid 224] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue Jan 15 09:23:07.781250 2013] [mpm_winnt:notice] [pid 3624:tid 224] AH00456: Server built: Aug 18 2012 12:41:37
[Tue Jan 15 09:23:07.781250 2013] [core:notice] [pid 3624:tid 224] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Jan 15 09:23:07.781250 2013] [mpm_winnt:notice] [pid 3624:tid 224] AH00418: Parent: Created child process 4088
[Tue Jan 15 09:23:08.390625 2013] [ssl:warn] [pid 4088:tid 1872] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jan 15 09:23:08.453125 2013] [mpm_winnt:notice] [pid 4088:tid 1872] AH00354: Child: Starting 150 worker threads.


my.ini
Code: Select all
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

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


# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"

# Change here for bind listening
# bind-address="127.0.0.1"
# bind-address = ::          # for ipv6

# Where do all the plugins live
plugin_dir = "C:/xampp/mysql/data/lib/plugin/"

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
# commented in by lampp security
#skip-networking
skip-federated

# Replication Master Server (default)
# binary logging is required for replication
# log-bin deactivated by default since XAMPP 1.4.11
#log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin


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

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

# Comment the following if you are using InnoDB tables
#skip-innodb
innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "C:/xampp/mysql/data"
#innodb_log_arch_dir = "C:/xampp/mysql/data"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="C:/xampp/mysql/share/charsets"

[mysqldump]
quick
max_allowed_packet = 16M

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

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


config.inc.php
Code: Select all
<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
 * End of servers configuration
 */

?>


PS: I didn't add any password to mysql and did not change any configuration settings. I've been using xampp 1.8.1 for 2 months now and this is the first time this happened.

What should I do? Please reply
Image
Image
Image
User avatar
Deuxe
 
Posts: 5
Joined: 15. January 2013 02:28
XAMPP Version: 1.8.3
Operating System: Windows XP SP3

Re: #2006 - MySQL server has gone away

Postby Altrea » 15. January 2013 06:26

Hi Deuxe,

first of all: Thank you very much for the very detailed error reporting. That helps a lot to avoid one or two questions right at the beginning :D

Deuxe wrote:The next day after i opened phpmyadmin, this error popped out.

Which action do you do resulting in that message?

Deuxe wrote:
  • Changed "max_allowed_packet" to "100M" (Still no luck)

Which max_allowed_packet value as it you have changed? The my.ini file contains values for mysqld and mysqldump which are independend of each other. The correct place would be the mysqld block.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6544
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: #2006 - MySQL server has gone away

Postby Deuxe » 15. January 2013 06:58

Altrea wrote:
Deuxe wrote:The next day after i opened phpmyadmin, this error popped out.

Which action do you do resulting in that message?

Well, i just do the usual things in work, start up the pc, open xampp and proceed to do the pages im making for the company... but then i noticed i cant login in the page im making, checked phpmyadmin and there you go... apache works fine tho... and i've noticed everytime i try to access mysql (refresh phpmyadmin or try logging in my page), port 443 in apache disappears and then appears again a few seconds later

Altrea wrote:
Deuxe wrote:
  • Changed "max_allowed_packet" to "100M" (Still no luck)

Which max_allowed_packet value as it you have changed? The my.ini file contains values for mysqld and mysqldump which are independend of each other. The correct place would be the mysqld block.

i changed the one right here:
[mysqld]
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"

still no luck so i changed it back to default

oh, and thanks for responding... i'm at work right now and i'm unable to continue anything im doing coz of this error :(
Image
Image
Image
User avatar
Deuxe
 
Posts: 5
Joined: 15. January 2013 02:28
XAMPP Version: 1.8.3
Operating System: Windows XP SP3

Re: #2006 - MySQL server has gone away

Postby Deuxe » 15. January 2013 08:22

tried using wamp and the same error appeared when i opened localhost/phpmyadmin/
maybe some global configuration error or something like that?

went back to xampp, checked localhost > status and here's the result
Image
mysql service is deactivated and i dont have any idea why :shock:
Image
Image
Image
User avatar
Deuxe
 
Posts: 5
Joined: 15. January 2013 02:28
XAMPP Version: 1.8.3
Operating System: Windows XP SP3

Re: #2006 - MySQL server has gone away

Postby Deuxe » 15. January 2013 09:33

sorry for spamming this thread (im just really desperate)

so i checked the security panel for xampp and this is the result
Image

i never set any password for xampp! i never did!
so out of my confusion i shutdown apache, mysql and xampp then ran "C:\xampp\mysql\resetroot.bat"
expecting to reset the root password... and checked it again... it's still the same... :(

as what i've said earlier, i tried deleting all files and folders under xampp and reinstalling it but still... same results... i am unable to remove the password in root
Image
Image
Image
User avatar
Deuxe
 
Posts: 5
Joined: 15. January 2013 02:28
XAMPP Version: 1.8.3
Operating System: Windows XP SP3

Re: #2006 - MySQL server has gone away

Postby IamJim » 14. December 2013 10:14

Looking like some unresolved, unanswered bug. Same issue for me.

viewtopic.php?f=14&t=67639&p=232252#p232252

Have 6-8 hours in yesterday and last night not resolved and could not sleep. Awoke 3am cause it needs to get done !!

And? I have tried this on (2) computers also..

Jim
IamJim
 
Posts: 56
Joined: 27. April 2009 03:01

Re: #2006 - MySQL server has gone away

Postby JJ_Tagy » 14. December 2013 12:35

The default installation works, so what qualifies it as a bug? What did you change from default? What are you trying to do? Reading your other post, it looks like you are trying to increase memory to import huge SQL through phpmyadmin?
JJ_Tagy
 
Posts: 515
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: #2006 - MySQL server has gone away

Postby IamJim » 14. December 2013 19:32

Thanks, for the reply...You are correct on importing larger than some consider a norm for CSV files.

Please read my updated post: viewtopic.php?f=14&t=67639&p=232252#p232252

...and maybe...Just maybe you could help with this issue this is out or whack please?

viewtopic.php?f=16&t=67646
IamJim
 
Posts: 56
Joined: 27. April 2009 03:01


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 43 guests