Solved

How to verify LOCK TABLES permissions on tablespace?

Posted on 2010-11-09
5
763 Views
Last Modified: 2012-05-10
How can I verify that the MySQL user has LOCK TABLES permission?  Is there a query I can run in phpMyAdmin?

If I don't have the permission, how can I give that permission to the user?
0
Comment
Question by:greddin
  • 3
5 Comments
 
LVL 13

Accepted Solution

by:
dsmile earned 500 total points
ID: 34099101
Use SHOW GRANTS FOR command.

http://dev.mysql.com/doc/refman/5.0/en/show-grants.html

Eg: SHOW GRANTS FOR 'root'@'localhost'

And yes, you can run it in phpMyAdmin.

Your account must have GRANT permission to grant permission to user
0
 
LVL 13

Expert Comment

by:dsmile
ID: 34099137
Another way is to show data stored in mysql db

http://www.databasejournal.com/features/mysql/article.php/10897_3311731_1/An-introduction-to-MySQL-permissions.htm

You can type this SQL to phpMyAdmin query window to see the result:

SELECT host, user, lock_tables_priv FROM mysql.user WHERE user = 'user_name_you_want_to_see'


If value in lock_tables_priv is Y then corresponding user has LOCK TABLES permission.

You can use GRANT command to grant permission to user http://dev.mysql.com/doc/refman/5.1/en/grant.html
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 34100433
You can use some gui tool its not helpful to go and look for command all the time search mysql gui you can download the tool and see these basic things in a mouse click
0
 
LVL 13

Expert Comment

by:dsmile
ID: 34101912
@greddin: in phpMyAdmin, if you can see mysql in DB list (in Database combo box on left frame) then follow these steps to get your info:
1. choose "mysql" from DB list
2. click on table "user"
3. click on "Browse" tab
4. on listed record list, look for value of column "Lock_tables_priv" of corresponding user.
5. "Y" means that user has LOCK TABLES permission.
0
 

Author Closing Comment

by:greddin
ID: 34104895
Thanks dsmile for your help.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question