You are not logged in.

#1 2011-12-09 12:01:02

nikbhardwaj
Member
Registered: 2009-09-02
Posts: 27

MySQL doesn't start[solved]

I can't get the MySQL server to start.
I have followed the wiki entry and fixed all the permissions and the ownership.
Here is the error log

lovelock# mysqld_safe                     
111209 17:28:19 mysqld_safe Logging to '/var/lib/mysql/lovelock.err'.
111209 17:28:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111209 17:28:19 mysqld_safe mysqld from pid file /var/lib/mysql/lovelock.pid ended
lovelock# cat /var/lib/mysql/lovelock.err 
111209 17:28:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld: Table 'mysql.plugin' doesn't exist
111209 17:28:19 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
111209 17:28:19 InnoDB: The InnoDB memory heap is disabled
111209 17:28:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111209 17:28:19 InnoDB: Compressed tables use zlib 1.2.5
111209 17:28:19 InnoDB: Initializing buffer pool, size = 128.0M
111209 17:28:19 InnoDB: Completed initialization of buffer pool
111209 17:28:19 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 49439
111209 17:28:19  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1595675
111209 17:28:19  InnoDB: Assertion failure in thread 140574630565664 in file fsp0fsp.c line 2101
InnoDB: Failing assertion: inode
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.
111209 17:28:19 - 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=262144
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 = 134067 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 = (nil) thread_stack 0x40000
/usr/bin/mysqld(my_print_stacktrace+0x2e)[0x7882ae]
/usr/bin/mysqld(handle_segfault+0x480)[0x516260]
/lib/libpthread.so.0(+0xf850)[0x7fda1469d850]
/lib/libc.so.6(gsignal+0x35)[0x7fda13362965]
/lib/libc.so.6(abort+0x17b)[0x7fda13363ddb]
/usr/bin/mysqld[0x506140]
/usr/bin/mysqld[0x8599af]
/usr/bin/mysqld[0x8671f8]
/usr/bin/mysqld[0x82adc9]
/usr/bin/mysqld[0x7d511c]
/usr/bin/mysqld[0x7a2bd7]
/usr/bin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x66e171]
/usr/bin/mysqld[0x58ff24]
/usr/bin/mysqld(_Z11plugin_initPiPPci+0xc18)[0x595278]
/usr/bin/mysqld[0x51b017]
/usr/bin/mysqld(_Z11mysqld_mainiPPc+0x46d)[0x51e51d]
/lib/libc.so.6(__libc_start_main+0xed)[0x7fda1334f17d]
/usr/bin/mysqld[0x514a79]
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.
111209 17:28:19 mysqld_safe mysqld from pid file /var/lib/mysql/lovelock.pid ended

How do I fix this?

Last edited by nikbhardwaj (2011-12-10 08:32:35)

Offline

#2 2011-12-09 14:25:44

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: MySQL doesn't start[solved]

Did you try running mysql_upgrade?

R.

Offline

#3 2011-12-10 08:17:23

nikbhardwaj
Member
Registered: 2009-09-02
Posts: 27

Re: MySQL doesn't start[solved]

lovelock# mysql_upgrade 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

I think that means that the mysql daemon myst be running first.

Offline

#4 2011-12-10 08:21:02

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: MySQL doesn't start[solved]

you have data in the databases? Because innodb is crashing because some table is corrupted and you must recover from a backup or apply the details from http://dev.mysql.com/doc/refman/5.5/en/ … overy.html

another good tutorial is http://www.mysqlperformanceblog.com/200 … orruption/


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2011-12-10 08:23:01

nikbhardwaj
Member
Registered: 2009-09-02
Posts: 27

Re: MySQL doesn't start[solved]

I have also tried uninstalling and re-installing to no avail.

lovelock# pacman -Rdd mysql

Remove (1): mysql-5.5.18-1

Total Removed Size:   77.83 MB

Do you want to remove these packages? [Y/n] y
(1/1) removing mysql                                                                       [#####################################################] 100%
warning: /etc/mysql/my.cnf saved as /etc/mysql/my.cnf.pacsave
lovelock# pacman -S mysql
resolving dependencies...
looking for inter-conflicts...

Targets (1): mysql-5.5.18-1

Total Download Size:    0.00 MB
Total Installed Size:   77.83 MB

Proceed with installation? [Y/n] y
(1/1) checking package integrity                                                           [#####################################################] 100%
(1/1) checking for file conflicts                                                          [#####################################################] 100%
(1/1) installing mysql                                                                     [#####################################################] 100%
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h lovelock password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/scripts/mysqlbug script!

Optional dependencies for mysql
    perl-dbi
    perl-dbd-mysql

Offline

#6 2011-12-10 08:29:59

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: MySQL doesn't start[solved]

if you don't care about databases, delete /var/lib/mysql and run

rm -rf /var/lib/mysql/*
mysql_install_db --user=mysql --basedir=/usr

Last edited by wonder (2011-12-10 08:30:32)


Give what you have. To someone, it may be better than you dare to think.

Offline

#7 2011-12-10 08:32:11

nikbhardwaj
Member
Registered: 2009-09-02
Posts: 27

Re: MySQL doesn't start[solved]

Thanks so much.
I deleted that directory and now mysql starts up.

Offline

Board footer

Powered by FluxBB