当前位置:Gxlcms > mysql > MySQL五个授权表的功能

MySQL五个授权表的功能

时间:2021-07-01 10:21:17 帮助过:33人阅读

mysql.user select host,user,password from mysql.user; grant all privileges on *.* to monty@localhost identified by

mysql.user

display:

  • mysql.db
  • display:

    Query OK, 0 rows affected (0.00 sec)Empty set (0.00 sec)Query OK, 0 rows affected (0.00 sec)+-----------+-------+------+| host | user | db |+-----------+-------+------+| localhost | monty | test |+-----------+-------+------+1 row in set (0.00 sec)

    mysql.host\

    #未测试

    mysql.tables_priv

    display:

    Empty set (0.00 sec)


    Query OK, 0 rows affected (0.00 sec)


    +-----------+------+------------+-------+
    | host | db | table_name | user |
    +-----------+------+------------+-------+
    | localhost | test | student | monty |
    +-----------+------+------------+-------+
    1 row in set (0.00 sec)


    Query OK, 0 rows affected (0.00 sec)

    mysql.columns_priv

    display:

    Empty set (0.00 sec)


    Query OK, 0 rows affected (0.00 sec)


    +-----------+------+-------+------------+-------------+-------------+
    | host | db | user | table_name | column_name | column_priv |
    +-----------+------+-------+------------+-------------+-------------+
    | localhost | test | monty | student | sno | Select |
    +-----------+------+-------+------------+-------------+-------------+
    1 row in set (0.00 sec)


    Query OK, 0 rows affected (0.00 sec)

    linux

    人气教程排行