When saving cron settings at admin/build/cron/settings, I get the following entry repeated dozens of times in my dblog:

Access denied for user 'drupal'@'localhost' to database 'drupal_live' query: LOCK TABLES variable WRITE in /var/www/live/drupal/includes/database.mysql.inc on line 328.

Every time cron runs I get a similar error:

Access denied for user 'drupal'@'localhost' to database 'drupal_live' query: LOCK TABLES variable WRITE in /var/www/live/drupal/includes/database.mysql.inc on line 328

These don't seem to impact the actual performance of the module, but are filling up my logs... any ideas?

Comments

Dane Powell’s picture

Status: Active » Closed (fixed)

Nevermind... I didn't notice that the drupal user needed to have lock privileges...

venusrising’s picture

Status: Closed (fixed) » Active

Hello-
Can someone please clarify. We cannot find any documentation on the Installation and settings portion.
We are getting tons of the same DB logs as above and are not sure how to correct this.
We do not have any settings filled it where it says key etc.
We did change crontab to be every minute.
We also set some tabs to fire by module.

Thanks for any help.

Dane Powell’s picture

Does your database user have LOCK privileges?

venusrising’s picture

Yes we made sure our host just added lock table permissions.
We are getting
User admin
Location http://www.oursite.com/admin/build/cron/execute/statistics_cron
Referrer http://www.oursite.com/admin/reports/event/1096025
Message Access denied for user 'oursite'@'localhost' to database 'drupal_oursite' query: LOCK TABLES variable WRITE in /home/oursite/html/includes/database.mysqli.inc on line 336.
Severity error

Oursite is used for our db name

venusrising’s picture

After the permission were given we still see the log errors

venusrising’s picture

Category: bug » support
venusrising’s picture

@Dane Powell We enabled lock privileges but it is still showing DB log errors. Is there a way to make sure lock privileges are set right. We had the host do it and use phpmyadmin

Dane Powell’s picture

Hey venusrising- just FYI, I'm not the maintainer of this module, so all I can really do is tell you what worked for me, which was to make sure that the Drupal user had LOCK TABLES permission. Judging by your error, your Drupal database (DB) user still does not have that perm. You'll want to go to your DB in PHPMyAdmin and click on the privileges tab to see if that's the case.

krishanchandra’s picture

I am also facing this problem :-

user warning: Access denied for user '' to database '' query: LOCK TABLES variable WRITE in includes/database.mysqli.inc on line 336.

gotheric’s picture

Status: Active » Closed (works as designed)

This has nothing to do with elysia_cron, it is a generic Drupal problem caused by a bad database configuration.

Look at this:
http://www.zyxware.com/articles/3168/solved-drupal-errors-drupal-6-lock-...
(Just for example, use google to find other solutions)

ron_s’s picture

Component: Code » Documentation
Status: Closed (works as designed) » Needs review

I'm curious to know why you would say this has "nothing to do with elysia_cron, and is a generic Drupal problem caused by a bad database configuration"?

The database server requirements for Drupal (http://drupal.org/requirements/database) state the following:

  • Drupal makes use of some features not available on some inexpensive hosting plans so please check that your host allows database accounts with the following rights: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER. These rights are sufficient to run Drupal 6 and 7
  • Some contributed modules, and also Drupal core 5.x (but not Drupal core 6.x), additionally require the following rights: CREATE TEMPORARY TABLES, LOCK TABLES.

"LOCK TABLES" is not required by Drupal core 6.x. You should update the module documentation to note that LOCK TABLES is a requirement for Elysia Cron.

kala4ek’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Drupal 6 is not supported anymore.