We were unable to lock a test table on your MySQL database server. We tried locking a table with the command LOCK TABLES drupal_install_test WRITE and MySQL reported the following error: Access denied for user: 'recoverl_drupal@localhost' to database 'recoverl_drupal5'.

I've entered the correct database and user name, given the user full permissions, but still I get this. I'm able to log in fine with phpmyadmin or FlashMyAdmin with the same settings, and have no problem making new tables. I tried installing Drupal 4.7.6 as well, and had the same problem.

My host is Dot5Hosting, in case anyone's familiar with their particular setup.

Many thanks in advance for assistance!

Comments

vm’s picture

your database user needs lock table permissions

NOTE: 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:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES

see: http://drupal.org/requirements

barliesque’s picture

As I say, I've given full permission to the user. However, "LOCK" is not one of the available permission types in Dot5's control panel. The following permissions are all granted:

Select Insert Update Delete Create Drop Index Alter

vm’s picture

then you will have to ask your host to add the LOCK permission as their idea of "full permissions" is only what they provide and not truly "full permissions"

barliesque’s picture

Thanks for your help. I asked for the two missing privileges, and got one of 'em. Dot5 responded as follows...

We do not provide the Create Temporary Table privilege. We have provided the lock table privilege for your user for the drupal application.

So, now Drupal has installed completely, but with errors, due to the missing privilege.

<blockquote># user warning: Access denied for user: 'recoverl_drupal@localhost' to database 'recoverl_drupal5' query: CREATE TEMPORARY TABLE missing_nids SELECT n.nid, n.created, n.uid FROM node n LEFT JOIN node_comment_statistics c ON n.nid = c.nid WHERE c.comment_count IS NULL in /home/recoverl/public_html/drupal/includes/database.mysql.inc on line 172.
# user warning: Table 'recoverl_drupal5.missing_nids' doesn't exist query: INSERT INTO node_comment_statistics (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) SELECT n.nid, n.created, NULL, n.uid, 0 FROM missing_nids n in /home/recoverl/public_html/drupal/includes/database.mysql.inc on line 172.<blockquote>

...so without the CREATE TEMPORARY TABLE, is Drupal going to work properly?

vm’s picture

I don't know what effect that will have on a Drupal installation. I would imagine certain features of Drupal will not work properly.

kuangthien’s picture

I using Byethost Free hosting
I can't install Drupal:

We were unable to lock a test table on your MySQL database server. We tried locking a table with the command LOCK TABLES drupal_install_test WRITE and MySQL reported the following error: Access denied for user 'b18_298185'@'%' to database 'b18_298185_cva'.

Help me!

vm’s picture

Either give your user LOCK permissions on your database, or ask your host to give them to you. LOCK tables is a requirement to run Drupal. If you host will not comply, consider changing hosts.

see:

NOTE: 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, CREATE TEMPORARY TABLES, LOCK TABLES

shantanuo’s picture

Same error on Godaddy.com's Economy plan.

wacokid’s picture

I'm also using Byethost (free hosting) and had the same problem. Byethost has assigned me lock permissions but they don't think CREATE TEMPORARY TABLE is necessary. Drupal installation completed, but still reports:

user warning: Access denied for user: ... CREATE TEMPORARY TABLE missing_nids SELECT n.nid, n.created, n.uid FROM node n LEFT JOIN node_comment_statistics c ON n.nid = c.nid WHERE c.comment_count IS NULL in /home/recoverl/public_html/drupal/includes/database.mysql.inc on line 172

Does anyone know what parts of Drupal this breaks?

vm’s picture

I believe search is broken in this type of case, could be others.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

vinayakg’s picture

I have tried to install drupal in byte host and encountered same error with drupal 5.7
No such issues with drupal 6. it got installed without errors in bytehost free hosting. without those privileges.
Aslo try if the fantastico installer works.

In love and light ,

Vinayak

Drupal powered QA site @ http://computerkid.co.in

ragavendra_bn’s picture

Get SSH for your account.

1) If you have SSH enabled in your hosting account.
ssh user@linuxflavour.co.in

'user' is the hosting username
'linuxflavour.co.in' is the domain name. it can be ip also

2) once connected do type 'mysql'

3) In mysql prompt do

SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'ragavendra'@'localhost'

//////////
'drupal' is the database name
'ragavendra' is the database user name