LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-19-2014, 09:50 PM   #1
ravindert
Member
 
Registered: Oct 2011
Posts: 68

Rep: Reputation: Disabled
mysql database not working


HI All,

Kindly help me in resolving the mysql database get crashed due to some reason . We tried to restore the mysql directory under /var/lib of old dates when database was working fine , after we have started the mysql service we are getting the below error in the mysqld.log file .

Secondly we also tried to restore the database using its dump which we created by taking it into the innodb recovery mode 4 . And this dump is also created of old date data.

Below is the logs for mysqld.log and mysql dump logs.


40120 2:30:51 InnoDB: Error: page 456173 log sequence number 596 3894282887
InnoDB: is in the future! Current system log sequence number 2 1545511088.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.0/...-recovery.html
InnoDB: for more information.
140120 2:30:51 InnoDB: Error: page 456174 log sequence number 596 3894314563
InnoDB: is in the future! Current system log sequence number 2 1545511088.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.0/...-recovery.html
InnoDB: for more information.
140120 2:30:51 InnoDB: Error: page 456175 log sequence number 596 3894353246
InnoDB: is in the future! Current system log sequence number 2 1545511088.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.0/...-recovery.html
InnoDB: for more information.
^Cls
[root@linux mnt]# /etc/init.d/mysqld status
mysqld (pid 17435) is running...
[root@linux mnt]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use postfix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database: postfix

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

mysql> eixt
-> exit
-> Aborted
[root@linux mnt]# [A

total 10651880
drwxr-xr-x 2 mysql mysql 12288 Oct 20 02:19 postfix
-rw-r-xr-x 1 mysql mysql 10886316032 Oct 20 02:36 ibdata1.old
-rw-rw---- 1 mysql mysql 5242880 Oct 20 02:36 ib_logfile1
drwxrwxrwx 2 mysql mysql 4096 Apr 18 2013 mysql
srwxrwxrwx 1 mysql mysql 0 Oct 20 02:36 mysql.sock
drwxrwxrwx 2 mysql mysql 4096 Apr 18 2013 test
[root@linux mysql]# mys
[root@linux mysql]# ls -lh /dump/anv.sql
-rw-r--r-- 1 root root 6.5G Oct 19 20:24 /dump/anv.sql
[root@linux mysql]# mysql -u root --force -p postfix < /dump/anv.sql
Enter password:
ERROR 2013 (HY000) at line 7549: Lost connection to MySQL server during query
ERROR 2006 (HY000) at line 7550: MySQL server has gone away
ERROR 2006 (HY000) at line 7551: MySQL server has gone away
ERROR 2006 (HY000) at line 7552: MySQL server has gone away
ERROR 2006 (HY000) at line 7558: MySQL server has gone away
ERROR 2006 (HY000) at line 7559: MySQL server has gone away
ERROR 2006 (HY000) at line 7560: MySQL server has gone away
ERROR 2006 (HY000) at line 7561: MySQL server has gone away
ERROR 2006 (HY000) at line 7567: MySQL server has gone away
ERROR 2006 (HY000) at line 7573: MySQL server has gone away
ERROR 2006 (HY000) at line 7574: MySQL server has gone away
ERROR 2006 (HY000) at line 7575: MySQL server has gone away
ERROR 2006 (HY000) at line 7576: MySQL server has gone away
ERROR 2006 (HY000) at line 7582: MySQL server has gone away
ERROR 2006 (HY000) at line 7583: MySQL server has gone away
ERROR 2006 (HY000) at line 7584: MySQL server has gone away
ERROR 2006 (HY000) at line 7585: MySQL server has gone away
ERROR 2006 (HY000) at line 7601: MySQL server has gone away
ERROR 2006 (HY000) at line 7607: MySQL server has gone away
ERROR 2006 (HY000) at line 7608: MySQL server has gone away
ERROR 2006 (HY000) at line 7609: MySQL server has gone away
ERROR 2006 (HY000) at line 7610: MySQL server has gone away
ERROR 2006 (HY000) at line 7616: MySQL server has gone away
ERROR 2006 (HY000) at line 7617: MySQL server has gone away
ERROR 2006 (HY000) at line 7618: MySQL server has gone away
ERROR 2006 (HY000) at line 7619: MySQL server has gone away
ERROR 2006 (HY000) at line 7636: MySQL server has gone away
ERROR 2006 (HY000) at line 7642: MySQL server has gone away
 
Old 01-19-2014, 10:58 PM   #2
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
This could be of some help.
 
Old 01-20-2014, 02:26 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Okay the log gave some hints about whats wrong but not really anything to solve this. I don't know where to start so I just get some random order going.

The name of the ibdata1.old file, my installation does not have the .old suffix.

The reason why you get error "ERROR 2006 (HY000) at line 7642: MySQL server has gone away" is due to mysql shutting it self down if innodb table space or log space is damaged. This is to prevent any further damage and possible repair of it. So if you fix the innodb space files your server will stay active.

If you have a dump of the table maybe its best to use that on a fresh installation. Move all you got now to another directory. Then use mysql_install_db to recreate the base mysql tables. AFter this just use the dump to get the db up and running. Use disable keys if not allready in the dump to speed up things.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix +Cyrus SASL authentication problem + pam-mysql+mysql database kibirango Slackware 1 12-25-2012 08:47 AM
[SOLVED] yum install php-mysql create problem to my running mysql database jsaravana87 Linux - Server 1 08-11-2011 03:24 AM
How can i copt the MYSQL Database to a other server (Database) halvorls Linux - Server 3 07-27-2008 09:19 PM
Unable to connect to (working) mySQL database rcs1000 Linux - Software 1 10-16-2005 07:23 AM
Writing an app that uses a mysql database without installing mysql server? QtCoder Programming 4 08-09-2004 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration