`
javadonkey
  • 浏览: 110561 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

mysql 常用命令

阅读更多
一、创建用户
grant create,drop,alter,select,insert,update,delete on *.* to test1@"%" identified by "abc";

  • *.* 表示所有数据库的访问权限,可以换成数据库的名 如test.*
  • "%" 表示可以在任何机器上登陆、对数据库操作,可以换成localhost表示只能在localhost对数据库操作

权限      列       Context
select    Select_priv    表                                     
insert    Insert_priv    表 
update    Update_priv    表
delete    Delete_priv    表
index     Index_priv    表
alter     Alter_priv    表
create    Create_priv    数据库、表或索引
drop      Drop_priv     数据库或表
grant     Grant_priv     数据库或表
references  References_priv  数据库或表
reload    Reload_priv    服务器管理
shutdown   Shutdown_priv   服务器管理
process    Process_priv    服务器管理
file     File_priv      在服务器上的文件存取
二、查看表字段
describe tablename;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics