Monday, May 6, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 7418  / 1 Year ago, fri, february 24, 2023, 4:32:59

I am completely stumped right now, whilst I am not an advanced user, I know my way around Ubuntu and so tried to look into things with the help of certain forum topics.



The Problem:
Today, quite randomly, mysql stopped working on my local laptop. I could no longer get the service to start up either



$ sudo mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111


So after a lot of searching and checking file permissions as other posts have suggested I decided enough was enough and went for the complete reinstall of mysql. This also didn't work. And so I found this post to go for a complete purge: "Failed to spawn mysql main process: unable to execute: No such file or directory"



Again no luck, and a lot of other posts I found either have solutions which haven't worked for me, or do not have any solution at all. Not really sure what to try next, or whether this is a common issue others are having. Any suggestions on tests I can run would be most appreciated to resolve this as I could really do with having mysql back and working again.



The current errors I get when I go to reinstall mysql are:



Setting up mysql-client-5.5 (5.5.31-0ubuntu0.13.04.1) ...
Setting up mysql-server-5.5 (5.5.31-0ubuntu0.13.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin ...
No apport report written because MaxReports has already been reached
ldconfig deferred processing now taking place
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mysql-server-5.5 (5.5.31-0ubuntu0.13.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5


So it's implying an issue with mysql-server-5.5 but not sure what or why, as this should be completely fresh.



Thanks for any time and/or advice you can give,
Dan



Update1
Found a new post with a new idea, no luck, but more error information potentially to help debug this



$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.5 (5.5.31-0ubuntu0.13.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)


Update2
Results of the error.log in mysql



$ tail /var/log/mysql/error.log
/usr/sbin/mysqld(+0x59043a)[0xb745943a]
/usr/sbin/mysqld(+0x590cd3)[0xb7459cd3]
/usr/sbin/mysqld(+0x585fea)[0xb744efea]
/usr/sbin/mysqld(+0x4c57b9)[0xb738e7b9]
/usr/sbin/mysqld(+0x4b785e)[0xb738085e]
/usr/sbin/mysqld(+0x4ba8f1)[0xb73838f1]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d78)[0xb6e78d78]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xb6c083de]
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.
retrobadger@Laptop-Badger:~$ tail -n50 /var/log/mysql/error.log
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
130509 11:30:18 InnoDB: Assertion failure in thread 2792295232 in file fsp0fsp.c line 3309
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.
10:30:18 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=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 = 346064 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 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x33)[0xb72ea683]
/usr/sbin/mysqld(handle_fatal_signal+0x48c)[0xb71af2fc]
[0xb6ea6400]
/usr/sbin/mysqld(+0x53c7da)[0xb74057da]
/usr/sbin/mysqld(+0x4ee825)[0xb73b7825]
/usr/sbin/mysqld(+0x4eefcc)[0xb73b7fcc]
/usr/sbin/mysqld(+0x59043a)[0xb745943a]
/usr/sbin/mysqld(+0x590cd3)[0xb7459cd3]
/usr/sbin/mysqld(+0x585fea)[0xb744efea]
/usr/sbin/mysqld(+0x4c57b9)[0xb738e7b9]
/usr/sbin/mysqld(+0x4b785e)[0xb738085e]
/usr/sbin/mysqld(+0x4ba8f1)[0xb73838f1]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d78)[0xb6e78d78]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xb6c083de]
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.


Update3



May  9 09:51:11 Laptop-Badger mysqld_safe[4193]: 130509  9:51:11  InnoDB: Error: page 11444 log sequence number 7800613976
May 9 09:51:11 Laptop-Badger mysqld_safe[4193]: InnoDB: is in the future! Current system log sequence number 7672896206.
May 9 09:51:11 Laptop-Badger mysqld_safe[4193]: InnoDB: Your database may be corrupt or you may have copied the InnoDB
May 9 09:51:11 Laptop-Badger mysqld_safe[4193]: InnoDB: tablespace but not the InnoDB log files. See
May 9 09:51:11 Laptop-Badger mysqld_safe[4193]: InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
May 9 09:51:11 Laptop-Badger mysqld_safe[4193]: InnoDB: for more information.

More From » installation

 Answers
1

To get a complete answer from the comments above for posterity



There are 2 locations that can stay around after an uninstall




  1. settings in /etc/mysql. If one of the settings is really broken, you might have a problem staring your daemon.

  2. the databases in /var/lib/mysql. If you have a broken database, especially innodb, the start-process will start fixing these. If they can't, you won't be able to start mysql.



Removing both should help you fix any issues.



Mind you that your databases will be gone if you remove /var/lib/mysql and you settings will be gone if you remove /etc/mysql. be sure to understand this


[#31306] Saturday, February 25, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rmodmi

Total Points: 390
Total Questions: 122
Total Answers: 111

Location: Venezuela
Member since Mon, Oct 18, 2021
3 Years ago
;