Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Is it possible in MySQL to block users from executing these statements?

DESC "table"
SHOW TABLES
SHOW CREATE TABLE "table"

Or I need to write a MySQL transport port wrapper ?

GRANT ON TABLE does not help to hide database structure from a user.
I want my developers to not be allowed of dumping database structure and show tables name

The configuration file: /etc/my.cnf

[mysqld]
skip-show-database
skip-networking
bind-address=127.0.0.1
#skip-show-tables
#skip-table-stucture-show
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

What I am about to say would be rather crazy but entirely possible. Here it goes...

CRAZY SUGGESTION #1

CRAZY SUGGESTION #2

  • Download MySQL Proxy
  • Program the LUA scripts to ignore
    • DESC "table"
    • SHOW TABLES
    • SHOW CREATE TABLE "table"
  • Have your developers access DB using MySQL-Proxy-based IP Addresses

EPILOGUE

I would say Give it a Try, but I have never done anything like this before.

Notwithstanding, it would be a brave C/C++ or LUA soul indeed to engage in such an undertaking...

share|improve this answer
1  
Crazy suggestion 1b (download and compile the mysql server)? I mean for 1 to work, you'll have to restrict their access to the Internet so they don't get another client, restrict command line access, not allow PHPMyAdmin install (or restrict use), whatever that can be connected should be removed. –  ypercube Jul 3 '13 at 20:15
    
@ypercube and call it YourSQL !!! –  RolandoMySQLDBA Jul 3 '13 at 20:17
    
Just wow. It just might work... –  gbn Jul 4 '13 at 9:35
    
Thanks i try "MySQL Proxy" good choice –  Denji Jul 6 '13 at 18:52
add comment

SHOW TABLE is implied by SELECT because SELECT means you need to see the table structure. So it can't be blocked. The same applies for SHOW CREATE TABLE

DESC = DESCRIBE = SHOW COLUMNS FROM anyway, which is the same.

So no, it can't be done via MySQL Permissions if you want the developers to run queries

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.