Skip to main content

Lost connection to MySQL server during query error

Comments

7 comments

  • cPanelMichael
    Hello, Do you notice any error messages in the MySQL error log (/var/lib/mysql/$hostname.err) when restarting MySQL? Thank you.
    0
  • dave321
    Have a similar issue. Have identified the database that is affected. Created a new database and imported mysql from backup. Website is working now. Trouble is I can't delete the old database. Tried everything. * Issued ssh commands to delete table. Delete database. Each time mySQL loses connection. - Command: mysql> DROP TABLE tableNameHere; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 32 Current database: databaseNameHere ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) ERROR: Can't connect to the server * phpmyadmin. When selecting database the tables fail to load.
    0
  • cPanelMichael
    ERROR 2006 (HY000): MySQL server has gone away

    Do you notice any error messages in the MySQL error log (/var/lib/mysql/$hostname.err) when this happens? Thank you.
    0
  • dave321
    MySQL Error Log: InnoDB: End of page dump 2018-01-31 08:30:08 7f3dc46d7700 InnoDB: uncompressed page, stored checksum in field1 3611825200, calculated checksums for field1: crc32 2153513901, innodb 275906502, none 3735928559, stored checksum in field2 1701165504, calculated checksums for field2: crc32 2153513901, innodb 1701165504, none 3735928559, page LSN 40 2723214147, low 4 bytes of LSN at page end 2723214147, page number (if stored to page already) 3, space id (if created with >= MySQL-4.1.1 and stored already) 27593 InnoDB: Page may be an update undo log page InnoDB: Page may be an index page where index id is 69111 InnoDB: (index "PRIMARY" of table "databaseNameHere"."prefix_menu_types") InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 3. InnoDB: You may have to recover from a backup. InnoDB: It is also possible that your operating InnoDB: system has corrupted its own file cache InnoDB: and rebooting your computer removes the InnoDB: error. InnoDB: If the corrupt page is an index page InnoDB: you can also try to fix the corruption InnoDB: by dumping, dropping, and reimporting InnoDB: the corrupt table. You can use CHECK InnoDB: TABLE to scan your table for corruption. InnoDB: See also MySQL :: MySQL 5.6 Reference Manual :: 14.21.2 Forcing InnoDB Recovery InnoDB: about forcing recovery. InnoDB: Error: Unable to read tablespace 27593 page no 3 into the buffer pool after 100 attempts InnoDB: The most probable cause of this error may be that the table has been corrupted. InnoDB: You can try to fix this problem by using innodb_force_recovery. InnoDB: Please see reference manual for more details. InnoDB: Aborting... 2018-01-31 08:30:08 7f3dc46d7700 InnoDB: Assertion failure in thread 139903265240832 in file buf0buf.cc line 2740 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to MySQL :: MySQL 5.6 Reference Manual :: 14.21.2 Forcing InnoDB Recovery InnoDB: about forcing recovery. 16:30:08 UTC - mysqld got signal 6 ; --- Just want to delete the database and nothing I do allows for that. Thanks in advance.
    0
  • 24x7server
    Hi, It appears the database was removed completely and part of it still remained in the InnoDB.. You may try executing innodb recovery on your server, or you can remove the database and database files manually from that location, create a similar database with same name and then restore the database from the backup on it. After the innodb is fixed, you can then remove it properly...
    0
  • cPanelMichael
    InnoDB: Database page corruption on disk or a failed

    This shows InnoDB corruption. We provide a guide on this at: Thank you.
    0
  • dave321
    Added this to my.cnf file: innodb_force_recovery = 1 Stops all websites from working once added. Followed instructions to: USE dbname; CREATE TABLE tablename_recovered LIKE tablename; INSERT INTO tablename_recovered SELECT * FROM tablename; Ran into a few MySQL errors. Not sure why. The recovered table was created. Tried to DROP tablename and couldn't in shell. Went into phpmyadmin. Was now able to select the offending table. Deleted offending table. Using CPanel, deleted the database. Thanks for your information. - Dave
    0

Please sign in to leave a comment.