Enable external locking in MySQL
External locking is a method that allow MySQL aware of external program(s) might also have access to the database tables as the same time, so if other programs locked the files, MySQL will wait until those files are unlocked.
This is not recommended and poor for MySQL performance, so you should turn off it unless you have multiple MySQL servers using the same database directory.
To enable it, edit the MySQL configurations, e.g. /etc/my.cnf
.. external-locking ..
Don't forget to restart MySQL to take effect.
# /sbin/service mysqld restart