Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to verify LOCK TABLES permissions on tablespace?

Posted on 2010-11-09
5
Medium Priority
?
766 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 13

Accepted Solution

by:
dsmile earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 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