Page 1 of 1
Database Error :lock tables
Posted: Wed Nov 30, 2005 7:10 am
by Slavenska
Hi Marco
First of all congratulations and thanks to make our live a litbit easier!
ERROR IN: lock tables prenota2005 write,soldi2005 write,personalizza read
1044: Access denied for user: "xxx" to database "yyyyyy"
I change the pconnect and resolve the conection problem but this still hapens. It the same in differents pages, and different tables. maybe the permissions are wrong?
Any sugestions?
Slav
Posted: Wed Nov 30, 2005 6:33 pm
by marco
Maybe the database user doesn't have the privileges to lock tables. You can change those with phpmyadmin or if you can send queries as root user try this one:
GRANT ALL PRIVILEGES on databasename.* to user@localhost IDENTIFIED BY 'pass';
Did you get the same problem as Adam? I still haven't been able to reproduce it, maybe it is a configuration or hardware problem. What's your environment (easyphp on windows, linux distribution)?
Marco
Posted: Thu Dec 01, 2005 4:49 pm
by adam
Hi Both
It sounds like your having the same error as me... but I changed pconnect to connect and since then (touch wood) I have had not problems!!!
A
Posted: Fri Sep 01, 2006 4:02 pm
by m4d
I have the same error ... ERROR IN: lock tables
Did you find a solution ?
Posted: Sat Sep 02, 2006 1:03 pm
by m4d
the problem comes from the mysql privileges … Can we use an another instruction ? Thanks
Posted: Wed Sep 13, 2006 8:13 am
by marco
The mysql user must have lock privileges, for this problem you should ask your own hosting provider.
Marco
Posted: Fri Jan 26, 2007 8:26 pm
by mrice
I just installed PHP-Residence, all is working fine except that on every page I receive this error:
ERROR IN: lock tables anni read,prenota2007 read,ntariffe2007 read,periodi2007 read,appartamenti read,clienti read,regole2007 read,personalizza read
1044: Access denied for user 'user'@'localhost' to database 'db'
situation at 12:29 of 26/1/2007
I know that the username/database are correct because it actually makes the changes, but for some reason it can't lock the tables? The user has all privileges on the appropriate database, and I even tried giving that use all privileges to the mysql database but nothing helped.
Am I missing a table in my mysql database?
mysql> show tables;
+-----------------+
| Tables_in_mysql |
+-----------------+
| columns_priv |
| db |
| func |
| host |
| tables_priv |
| user |
+-----------------+
Any help would be appreciated
Posted: Sat Jan 27, 2007 6:01 pm
by marco
The user must have LOCK privileges. Have you tried this query (from the README)?
GRANT ALL PRIVILEGES on databasename.* to user@localhost IDENTIFIED BY 'pass';
changing databasename, user and pass with your data.
Marco
Tried grant all
Posted: Mon Jan 29, 2007 7:09 pm
by mrice
Yes I ran that exact query, I even tried doing Grant All on the mysql database, but that didn't work either.
Could there be something wrong with my server(mysql) settings?
-Matt
Posted: Tue Jan 30, 2007 11:31 am
by marco
Hello Matt,
try this query:
GRANT LOCK TABLES on databasename.* to user@localhost IDENTIFIED BY 'pass';
If it doesn't work you should discuss this issue with your hosting provider.
Marco
It must be a mysql problem
Posted: Tue Jan 30, 2007 10:03 pm
by mrice
I tried the above and got this result:
"Query OK, 0 rows affected (0.03 sec)"
I looked in my db table under mysql database and found that I was missing a Lock_tables_priv variable so I looked around and we have 4.1.2 installed, I'm fairly sure that something is wrong with the privilege schema.
Even though the requirements for php-residence state that you need mysql >=3.23.49 there is something wrong/missing with my installation.
I am my hosting provider, I directly manage my own servers so the next step is to update mysql!