查看user表

select Host,User,Password,Select_priv form user;

运行update命令,将MySQL数据库root用户的口令改成123456。

update user set password=password<'123456'> where user='root'

命令flush privileges的意思是强制刷新内存授权表,否则用的还是缓冲中的口令,这时非法用户还可

以用root用户及空口令登录,直到重启MySQL服务器

flush privileges;

运行delete命令,删除空用户。Host字段为localhost的匿名用户拥有所有的权限,就是说本地用户用

空的用户名和空的口令登录MySQL数据库服务器可以得到最高的权限,所以匿名用户必须删除。

<code>delete from user where user=&apos;&apos;;
</code>

User表,列出可以连接服务器的用户及其加密口令,并且它指定它们有哪种全局(超级用户)权限

<code>desc user;
</code>

DB表,列出所有数据库,而用户有权限访问它们

<code>dosc db;
</code>

与DB表结合使用在一个较好层次上控制特定主机对数据库的访问权限

desc host;

设置用户权限,本地增加一个具有所有权限的test 用户(超级用户),密码是test,*.*意味着“所有数

据库、所有表”。with grant option表示它具有grant权限

grant all privileges on *.* to test@localhost identified by 'test' with grant option;

运行结果:

<code>select User,Password form user;
</code>

删除用户权限

<code>revoke all on *.* from test@localhost;
</code>

删除用户test

delete from user where user='test';

<code>flush privileges;&nbsp; (强制更新授权表)
</code>

SQL注入攻防

Ethereal 0.10.10.0

Microsoft Internet Explorer 6.0

HttpWatch Professional Edition

Metasploit Framework

define(“FS_METHOD”, “direct”);

define(“FS_CHMOD_DIR”, 0777);

define(“FS_CHMOD_FILE”, 0777);

-------------------------------------------