I stopped mysqld by killing the process id, and then deleted mysqld.sock file also. Now, mysqld is not starting.
I know there is some data corruption. But now I nee
Wow. I had this issue because it was an early morning and my brain wasn't working. I was doing the following:
sudo mysqld -u root -p
when I should have been doing:
sudo mysql -u root -p
Hope this helps someone else who was having a rough morning like me.. hahah
You need to restore the innodb data files.
# cd /var/lib/mysql
# mkdir bak
# mv ibdata1 bak/
# mv ib_logfile* bak/
# cp -a bak/ibdata1 ibdata1
# cp -a bak/ib_logfile* .
# rm -rf bak
# service mysqld restart
Reference: http://notesonit.blogspot.hk/2013/05/innodb-unable-to-lock-ibdata1-error-11.html