LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-20-2015, 12:53 AM   #1
keungz
LQ Newbie
 
Registered: Nov 2012
Posts: 11

Rep: Reputation: Disabled
MySQL server refuses to start


I have a Debian squeeze server that is supposed to run MySQL, but after a hard reboot it is having problems starting up. Attempting to start it using /etc/init.d/mysql start produces this snippet in syslog:

Oct 20 07:13:08 hyperion mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 [Note] Plugin 'FEDERATED' is disabled.
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 InnoDB: Initializing buffer pool, size = 8.0M
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 InnoDB: Completed initialization of buffer pool
Oct 20 07:13:08 hyperion mysqld: InnoDB: The log sequence number in ibdata files does not match
Oct 20 07:13:08 hyperion mysqld: InnoDB: the log sequence number in the ib_logfiles!
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 InnoDB: Database was not shut down normally!
Oct 20 07:13:08 hyperion mysqld: InnoDB: Starting crash recovery.
Oct 20 07:13:08 hyperion mysqld: InnoDB: Reading tablespace information from the .ibd files...
Oct 20 07:13:08 hyperion mysqld: InnoDB: Restoring possible half-written data pages from the doublewrite
Oct 20 07:13:08 hyperion mysqld: InnoDB: buffer...
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 InnoDB: Started; log sequence number 0 150617369
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format 'user'

After googling the error I found that I had to repair a table by starting the server, then from another terminal access it and run the following:
mysql> use mysql
mysql> repair table host use_frm;
mysql> exit

However, already at the use mysql command, I get this wall of text in my mysqld terminal:
Code:
151020  7:50:03 [Note] Plugin 'FEDERATED' is disabled.
151020  7:50:03  InnoDB: Initializing buffer pool, size = 8.0M
151020  7:50:03  InnoDB: Completed initialization of buffer pool
151020  7:50:03  InnoDB: Started; log sequence number 0 150617379
151020  7:50:03 [Note] mysqld: ready for connections.
Version: '5.1.63-0+squeeze1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
mysqld: malloc.c:3097: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
05:51:07 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=10
max_threads=151
thread_count=10
connection_count=10
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346521 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f98cdbcac30
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f98c59a7e88 thread_stack 0x30000
mysqld(my_print_stacktrace+0x29) [0x7f98ccc7a689]
mysqld(handle_fatal_signal+0x483) [0x7f98cca8ea53]
/lib/libpthread.so.0(+0xeff0) [0x7f98cc1e0ff0]
/lib/libc.so.6(gsignal+0x35) [0x7f98cac831b5]
/lib/libc.so.6(abort+0x180) [0x7f98cac85fc0]
/lib/libc.so.6(+0x71dda) [0x7f98cacc2dda]
/lib/libc.so.6(+0x74d2d) [0x7f98cacc5d2d]
/lib/libc.so.6(__libc_malloc+0x70) [0x7f98cacc7a30]
mysqld(my_malloc+0x32) [0x7f98ccc64372]
mysqld(alloc_root+0xd5) [0x7f98ccc64bc5]
mysqld(push_warning(THD*, MYSQL_ERROR::enum_warning_level, unsigned int, char const*)+0x194) [0x7f98cca14a84]
mysqld(my_message_sql+0x141) [0x7f98cc980c51]
mysqld(my_error+0xd8) [0x7f98ccc66118]
mysqld(open_table_def(THD*, st_table_share*, unsigned int)+0xeec) [0x7f98cc9dd95c]
mysqld(get_table_share(THD*, TABLE_LIST*, char*, unsigned int, unsigned int, int*)+0x230) [0x7f98cc9cbb00]
mysqld(+0x3c454b) [0x7f98cc9d254b]
mysqld(open_table(THD*, TABLE_LIST*, st_mem_root*, bool*, unsigned int)+0x7d5) [0x7f98cc9d3645]
mysqld(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int)+0x6ee) [0x7f98cc9d437e]
mysqld(open_normal_and_derived_tables(THD*, TABLE_LIST*, unsigned int)+0x1e) [0x7f98cc9d451e]
mysqld(mysqld_list_fields(THD*, TABLE_LIST*, char const*)+0x20) [0x7f98ccab1f60]
mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x17f2) [0x7f98cc999a02]
mysqld(do_command(THD*)+0xea) [0x7f98cc999caa]
mysqld(handle_one_connection+0x236) [0x7f98cc98b796]
/lib/libpthread.so.0(+0x68ca) [0x7f98cc1d88ca]
/lib/libc.so.6(clone+0x6d) [0x7f98cad2092d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f98cdbd5610):
Connection ID (thread ID): 16
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
What exactly is going on here, and more importantly - is this repairable?
 
Old 10-20-2015, 01:05 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think these are the key lines:
Code:
Oct 20 07:13:08 hyperion mysqld: 151020 7:13:08 InnoDB: Database was not shut down normally!
Oct 20 07:13:08 hyperion mysqld: InnoDB: Starting crash recovery.
and looking at your comment about a 'hard reboot', it sounds to me like you pulled the plug or similar without first ensuring the DB was shutdown.
As a result, it wasn't ... which leads to corruption.

I think you'll be very lucky to repair that - hope you've got a backup of the data.

You could try asking over at the MySQL forums - you might(!) get lucky, but don't bet on it.
http://forums.mysql.com/
 
Old 10-20-2015, 09:42 AM   #3
keungz
LQ Newbie
 
Registered: Nov 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thank you, I'll try my luck on the mysql forums
 
  


Reply

Tags
mysql



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
[SOLVED] MariaDB server refuses to start UltrasonicMadness Linux - Software 5 09-29-2015 07:49 PM
Freshly installed Mysql (mysql-community-server) fails to start cpartsenidis Linux - Software 2 02-12-2015 12:41 AM
Mcelog refuses to start on virtualized server Taronyu Linux - Server 2 08-11-2013 12:33 PM
After moving mysql db to NFS[netapp] unable to start mysql server throws error naveenrajn Linux - General 3 09-13-2010 02:20 AM
I have RHEL 5.0 and MySQL start problem, my MySQL server doesn't start rsatya Linux - Enterprise 4 02-03-2009 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:57 PM.

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