Solved

How to verify LOCK TABLES permissions on tablespace?

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

839 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