MySQL/InnoDB – ‘Unable to lock’ issue

Root# tail  -f /var/log/mysqld.log

nnoDB: Unable to lock /path/to/ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

 

Do the following steps

  1. kill the lingering mysql process
  2. Go to /var/lib/mysql
  3. mv (move) ibdata1 file to ibdata1.bad
  4. cp -a ibdata1.bad ibdata1
  5. restart the db server

The mysql instance started a crash recovery and in the end all was good again.  On the error log, here’s what I saw (recovery messages):

100825 16:58:37  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...
100825 16:58:40  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 8 2737988291.
InnoDB: Doing recovery: scanned up to log sequence number 8 2738024293
100825 16:58:48  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: In a MySQL replication slave the last master binlog file
InnoDB: position 0 182, file name log-bin.000039
100825 16:59:12  InnoDB: Started; log sequence number 8 2738024293
 
  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

Restricting FTP user from climbing back to /home

1) Edit vsftpd.conf 2) unhash chroot_local_user=YES

Error when browsing phpinfo.php warning : phpinfo() has been disabled for security reasons

You have added phpinfo in the disabled functions in your php.ini Ssh to your server and...

Uploaded files of FTP shows 600 instead of 644

vi /etc/vsftpd.con localumask=022 /etc/init.d/vsftpd restart

FTP not connecting giving errors in CentOS

1) Check if selinux is disabled # getenforce If it shows enforcing, then selinux is restricting...

Dig command is not working

Use this command to install dig command. # apt-get install dnsutils