Solved

How to verify LOCK TABLES permissions on tablespace?

Posted on 2010-11-09
5
759 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Creating and Managing Databases with phpMyAdmin in cPanel.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now