posts - 0,  comments - 5,  trackbacks - 0
grant all privileges on *.* to root@’192.168.2.%’ identified by ‘123456′;
*.*表示所有数据库的所有表,只为test数据库增加则改为test.*
root@’192.168.2.%’ 表示用户名为root,可以自行更改,’192.168.2.%’是限制访问的IP段
可单独指定一个IP.如’192.168.2.165′ 也可以用于所有IP ‘%’
identified by ‘123456′; 访问时的密码
如果只想设置部分权限,如只有查询和增加权限
grant select,create privileges on *.* to root@’192.168.2.%’ identified by ‘123456′;
权限一般有这几种select,insert,update,delete,create,drop

mysql 的表类型更改
修改
alter table tablename change colaname newcolname integer not null
增加
alter table tablename add colname integer not null
删除
alter table tablename drop colnum colname
posted on 2007-11-19 10:27 crazy 阅读(223) 评论(0)  编辑  收藏 所属分类: mysql数据库

只有注册用户登录后才能发表评论。


网站导航: