You are hereBlogs / vinayras's blog / Error: Table 'watchdog' was not locked with LOCK TABLES
Error: Table 'watchdog' was not locked with LOCK TABLES
Hi All,
Error:
Warning: Table 'watchdog' was not locked with LOCK TABLES query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, ......
I have shared database environment. Database is shared using $db_prefix in settings.php for each sub-domains.
Due to some changes, one of the sub-domains started giving this error. I tried searching for this in Google and Drupal.org support forums. Most of the answers were related to MySQL 4.0 and LOCK TABLE permissions issue. This did not help me since - i have granted all permissions to user accessing this database.
Finally after much testing many solutions, i found that the problem was in settings.php of that sub-domain itself.
While sharing database, one needs to make sure that follwing tables are NOT shared
-> cache_content
-> watchdog
Each sub-domain should use their own set of these tables.
With these changes my system is again working fine.
Please have a look at http://www.ebharat.in. We have 35 sub-domains (and growing) using same database with shared tables for sharing users, contents and so on.
Regards
Vinay Yadav
http://www.vinayras.com
















Dear Vinay, I have a similar error message, while I want to use a webform. I've found your blog in Google, when I've had searched for the problem. I'm a beginner! How can I share (or not) the database table? I have no cpanel, only phpmyadmin (and drupal 6.2, ubuntu 8.04, apache...)
Thanks for your kind answer!
Regards,
Laszlo Landi
Post new comment