语句已经执行成功了.是登陆不了吗?还是没有这个用户..用 select user,host from mysql.user where user = 'Chris'; 看一下有没有这个用户
flush privileges; 然后用新用户登录试试
grant select ,insert,update,delete on mydb.* to Chris@'localhost' identifie d by "Chris";
可是有2个同名的用户,host一个是 % 和localhost,我想删除一个,怎么老提示:DELETE FROM user WHERE User="fred" and Host="localhost";我删除语句: DELETE FROM user WHERE User="fred" and Host="localhost";
晕死,贴错,错误提示是:ERROR 1046 (3D000): No database selected我删除语句是:DELETE FROM user WHERE User="Chris" and Host="%";
select user,host from mysql.user where user = 'Chris';
看一下有没有这个用户
然后用新用户登录试试
d by "Chris";
可是有2个同名的用户,host一个是 % 和localhost,我想删除一个,怎么老提示:DELETE FROM user WHERE User="fred" and Host="localhost";我删除语句: DELETE FROM user WHERE User="fred" and Host="localhost";