MySQL Forums
Forum List  »  Backup

Table locking for export
Posted by: Jonathan Harris
Date: March 18, 2005 03:11AM

I can create a db through the hosts control panel. I can login to it, I can create a table, but as soon as the table is locked for writing with the LOCK TABLE command, it gives an error

Here's what happens:
------------------------------------------------------
LOCK TABLES `address_book` WRITE
MySQL said:
#1044 - Access denied for user 'mydbuser'@'%' to database 'mydbname'
------------------------------------------------------

He also asked me to this this:

------------------------------------------------------
GRANT SELECT , INSERT , DELETE ON mydbname . * TO 'mydbuser'@'%'
IDENTIFIED BY 'thepassword'
------------------------------------------------------

Which resulted in

------------------------------------------------------
MySQL said:
#1044 - Access denied for user 'mydbuser'@'%' to database 'mydbname'
------------------------------------------------------

If I manually edit out the "lock tables" command, it imports OK, but this is going to mean reworking all of the db sections of my php apps.

Finally, I found a way round this. However, the web host does not support it and replied:

------------------------------------------------------
"You could state that by introducing the table locking function in the first instance the problem could have also been avoided, but our experience of several other mySQL users indicates that if it was not this issue, it would probably be some other i.e. generally more support is required with the more complex areas of the hosting such as mySQL. I also understand that locking is not introduced as standard as it is often associated with being more trouble than it is worth with less experienced programmers locking their databases incorrectly."
------------------------------------------------------

Is there any truth in that? I've never come across a host that didn't allow (or automatically grant) the "lock" priviledge. Is what he says correct, or is it BS?

Options: ReplyQuote


Subject
Views
Written By
Posted
Table locking for export
3929
March 18, 2005 03:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.