2

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

2 Answers 2

2

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...

3
  • 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. Commented Jul 3, 2013 at 20:15
  • @ypercube and call it YourSQL !!! Commented Jul 3, 2013 at 20:17
  • Just wow. It just might work...
    – gbn
    Commented Jul 4, 2013 at 9:35
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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