亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長(zhǎng)資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    Mysql如何設(shè)置用戶指定ip地址操作數(shù)據(jù)庫(kù)

    Mysql設(shè)置用戶指定ip地址操作數(shù)據(jù)庫(kù)的方法:使用grant函數(shù),語(yǔ)法為【grant priv_type on mysql.user to 'user'@'host' identified by 'password' with】。

    Mysql如何設(shè)置用戶指定ip地址操作數(shù)據(jù)庫(kù)

    Mysql設(shè)置用戶指定ip地址操作數(shù)據(jù)庫(kù)的方法:

    語(yǔ)法:

    grant priv_type on mysql.user to 'user'@'host' identified by 'password' with grant option;
    • priv_type:代表允許操作數(shù)據(jù)庫(kù)的權(quán)限

    • user:代表數(shù)據(jù)庫(kù)用戶名

    • host:代表IP地址

    • password:代表設(shè)置的密碼

    刷新user權(quán)限表:flush privileges;

    三、案例

    1、設(shè)置所有數(shù)據(jù)庫(kù)、所有表、任意ip可以連接數(shù)據(jù)庫(kù),授權(quán)給用戶名ping并設(shè)置密碼為123456

    grant all on *.* to 'ping'@'%' identified by '123456'; flush privileges;

    2、授權(quán)表cloud的記錄修改權(quán)限給連接ip地址是192.168.100.1和用戶名是ping并且密碼為123456

    grant update(name,sex) on cloud to 'ping'@'192.168.100.1' identified by '123456'; flush privileges;

    四、查看數(shù)據(jù)庫(kù)權(quán)限表

    mysql> select * from mysql.user where host='localhost'G; *************************** 1. row ***************************                  Host: localhost                  User:              Password:           Select_priv: N           Insert_priv: N           Update_priv: N           Delete_priv: N           Create_priv: N             Drop_priv: N           Reload_priv: N         Shutdown_priv: N          Process_priv: N             File_priv: N            Grant_priv: N       References_priv: N            Index_priv: N            Alter_priv: N          Show_db_priv: N            Super_priv: N Create_tmp_table_priv: N      Lock_tables_priv: N          Execute_priv: N       Repl_slave_priv: N      Repl_client_priv: N      Create_view_priv: N        Show_view_priv: N   Create_routine_priv: N    Alter_routine_priv: N      Create_user_priv: N            Event_priv: N          Trigger_priv: N              ssl_type:            ssl_cipher:           x509_issuer:          x509_subject:         max_questions: 0           max_updates: 0       max_connections: 0  max_user_connections: 0

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)