Trouble With MySQL

Issues related to software problems.
Post Reply
jmcdiarmid_uk
Posts: 2
Joined: 2015/01/29 17:13:56

Trouble With MySQL

Post by jmcdiarmid_uk » 2015/01/29 17:21:47

Hi all

Im having trouble with MySQL. When I try to connect to the server I receive the following message

Code: Select all

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I have noticed when I run

Code: Select all

service mysqld stop
This returns the stopping ok message. However when I run afterwards

Code: Select all

service mysqld status
It sends back

Code: Select all

mysqld (pid 20600) is running...
I then ran the status command a few more time and noticed the PID is constantly increasing

Code: Select all

mysqld (pid 21835) is running...
[root@s15333475 log]# service mysqld status
mysqld (pid 21927) is running...
[root@s15333475 log]# service mysqld status
mysqld (pid 21988) is running...
[root@s15333475 log]# service mysqld status
mysqld (pid 21988) is running...
[root@s15333475 log]# service mysqld status
mysqld (pid 22079) is running...
[root@s15333475 log]# service mysqld status
mysqld (pid 22079) is running...
This is still coming up even though I have stopped the service

Hopefully someone can help!

Cheers

User avatar
TrevorH
Forum Moderator
Posts: 26956
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trouble With MySQL

Post by TrevorH » 2015/01/29 19:02:11

Look in /var/log/mysqld.log
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

jmcdiarmid_uk
Posts: 2
Joined: 2015/01/29 17:13:56

Re: Trouble With MySQL

Post by jmcdiarmid_uk » 2015/01/29 19:19:26

Code: Select all

150129 19:19:24  InnoDB: Page checksum 4137482002, prior-to-4.0.14-form checksum 2512119613
InnoDB: stored checksum 3992845418, prior-to-4.0.14-form stored checksum 2512119613
InnoDB: Page lsn 7 1924057793, low 4 bytes of lsn at page end 1924057793
InnoDB: Page number (if stored to page already) 5135,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 6708
InnoDB: (index "PRIMARY" of table "magento_n"."core_session")
InnoDB: Corruption of an index tree: table "magento_n"."core_session", index "PRIMARY",
InnoDB: father ptr page no 98958, child page no 98964
PHYSICAL RECORD: n_fields 5; compact format; info bits 32
 0: len 26; hex 6565643863706e636466706232396e6532696935687668733436; asc eed8cpncdfpb29ne2ii5hvhs46;;
 1: len 6; hex 00001021c509; asc    !  ;;
 2: len 7; hex 0e00000b622175; asc     b!u;;
 3: len 4; hex 549e5633; asc T V3;;
 4: len 30; hex 636f72657c613a353a7b733a32333a225f73657373696f6e5f76616c6964; asc core|a:5:{s:23:"_session_valid; (total 2852 bytes);
 n_owned: 0; heap_no: 5; next rec: 112
PHYSICAL RECORD: n_fields 2; compact format; info bits 0
 0: len 26; hex 6564736f753437636a736362353431396b37386b6a6538307336; asc edsou47cjscb5419k78kje80s6;;
 1: len 4; hex 0001828e; asc     ;;
 n_owned: 0; heap_no: 350; next rec: 12294
InnoDB: You should dump + drop + reimport the table to fix the
InnoDB: corruption. If the crash happens at the database startup, see
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html about
InnoDB: forcing recovery. Then dump + drop + reimport.
150129 19:19:24  InnoDB: Assertion failure in thread 140146082076992 in file btr0btr.c line 1304
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
19:19:24 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=8388608
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338554 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
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 = 0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x2e)[0x7c2e0e]
/usr/libexec/mysqld(handle_fatal_signal+0x3e2)[0x68c8a2]
/lib64/libpthread.so.0[0x7f765999cca0]
/lib64/libc.so.6(gsignal+0x35)[0x7f7657edd2c5]
/lib64/libc.so.6(abort+0x110)[0x7f7657eded70]
/usr/libexec/mysqld[0x8239d4]
/usr/libexec/mysqld[0x82839b]
/usr/libexec/mysqld[0x82caa0]
/usr/libexec/mysqld[0x8356d9]
/usr/libexec/mysqld[0x8d00da]
/usr/libexec/mysqld[0x8d0e9c]
/usr/libexec/mysqld[0x8c70fc]
/usr/libexec/mysqld[0x807e85]
/usr/libexec/mysqld[0x7fb743]
/usr/libexec/mysqld[0x7fe793]
/lib64/libpthread.so.0[0x7f765999483d]
/lib64/libc.so.6(clone+0x6d)[0x7f7657f8203d]
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.
150129 19:19:24 mysqld_safe Number of processes running now: 0
150129 19:19:24 mysqld_safe mysqld restarted
150129 19:19:24 [Note] libgovernor.so not found
150129 19:19:24 [Warning] option 'innodb-buffer-pool-size': signed value 2097152 adjusted to 5242880
150129 19:19:24 [Warning] option 'innodb-additional-mem-pool-size': signed value 512000 adjusted to 524288
150129 19:19:24 [Note] Plugin 'FEDERATED' is disabled.
150129 19:19:24 InnoDB: The InnoDB memory heap is disabled
150129 19:19:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150129 19:19:24 InnoDB: Compressed tables use zlib 1.2.3
150129 19:19:24 InnoDB: Using Linux native AIO
150129 19:19:24 InnoDB: Initializing buffer pool, size = 5.0M
150129 19:19:24 InnoDB: Completed initialization of buffer pool
150129 19:19:24 InnoDB: highest supported file format is Barracuda.
150129 19:19:24  InnoDB: Waiting for the background threads to start
Is that any help?

aks
Posts: 2844
Joined: 2014/09/20 11:22:14

Re: Trouble With MySQL

Post by aks » 2015/01/31 03:09:47

I assume you're using the MySQL client?

If so, it's trying to connect to the server through the socket located in /var/lib/mysql/mysql.sock. Does that exist? Who owns it? What SELinux context is it?

User avatar
TrevorH
Forum Moderator
Posts: 26956
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trouble With MySQL

Post by TrevorH » 2015/01/31 09:20:55

His problem is that the daemon is crashing not that he doesn't have permission to the socket.

I think this looks like time to boot and run memtest86+ on that machine for a day or so and see if the memory is OK.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 5 - Software Support”