努力学习,努力分享,努力.....在努力..努力离开..
分类: Mysql/postgreSQL
2014-02-15 11:28:39
MySQL的mysqlaccess用来检查对某个DB的权限,还会给出一些beware的建议,不错!
使用的时候通过-U -P给程序super user和pass来检查mysql db的表,从而给出完整的权限列表
:~# mysqlaccess -u tsetet -U ADMIN -P -p -d dbSGLog2
mysqlaccess Version 2.06, 20 Dec 2000
By RUG-AIV, by Yves Carlier ()
Changes by Steve Harvey ()
This software comes with ABSOLUTELY NO WARRANTY.
Password for MySQL user tsetet:
Password for MySQL superuser ADMIN:
Access-rights
for USER 'tsetet', from HOST 'localhost', to DB 'dbSGLog2'
+-----------------+---+ +-----------------+---+
| Select_priv | N | | Lock_tables_priv | N |
| Insert_priv | N | | Execute_priv | N |
| Update_priv | N | | Repl_slave_priv | N |
| Delete_priv | N | | Repl_client_priv | N |
| Create_priv | N | | Create_view_priv | N |
| Drop_priv | N | | Show_view_priv | N |
| Reload_priv | N | | Create_routine_priv | N |
| Shutdown_priv | N | | Alter_routine_priv | N |
| Process_priv | N | | Create_user_priv | N |
| File_priv | N | | Ssl_type | ? |
| Grant_priv | N | | Ssl_cipher | ? |
| References_priv | N | | X509_issuer | ? |
| Index_priv | N | | X509_subject | ? |
| Alter_priv | N | | Max_questions | 0 |
| Show_db_priv | N | | Max_updates | 0 |
| Super_priv | N | | Max_connections | 0 |
| Create_tmp_table_priv | N | | Max_user_connections | 0 |
+-----------------+---+ +-----------------+---+
BEWARE: Everybody can access your DB as user `tsetet' from host `localhost'
: WITHOUT supplying a password.
: Be very careful about it!!
BEWARE: Accessing the db as an anonymous user.
: Your username has no relevance
The following rules are used:
db : 'No matching rule'
host : 'Not processed: host-field is not empty in db-table.'
user : 'localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','','0','0','0','0'
BUGs can be reported by email to 原文地址:http://blog.itpub.net/82392/viewspace-144716/