Solved

How to verify LOCK TABLES permissions on tablespace?

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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