赞
踩
grant all privileges on *.* to 'root'@'10.10.11.12' identified by 'root666' with grant option;
flush privileges;
ALL PRIVILEGES ON 后面的 *.*表示所有数据库
grant priv_type on database.table to user[identified by [password] 'password'][,user [identified by [password] 'password']...]
*代表全部,*.* 表示全部数据库的全部表
grant all on *.* to 'test'@'%' identified by 'pwd';
grant select,insert,update,delete on mydb.* to 'test'@'1.1.1.1' identified by 'pwd';
grant update(name,age) on mydb.stu to 'test'@'1.1.1.1' identified by 'pwd';
GRANT SELECT ON *.* TO 'test'@'1.1.1.1' identified by 'pwd'
GRANT ALL ON mydb.* to 'test'@'1.1.1.1' identified by 'pwd'
GRANT UPDATE(age) on databaseName.tableName to 'test'@'1.1.1.1'
GRANT Select(address) on databaseName.tableName to 'test'@'1.1.1.1'
crate user username [identified by [password] 'password'],[user [identified by [password] 'password'] ]...
create user 'name'@'%' identified by 'pwd'
;insert into mysql.user(host,user,password,ssl_cipher,x509_issuer,x509_subject) values ('%','usename',password('pwd'),'','','')
grant priv_type on database.table to user[identified by [password] 'password'][,user [identified by [password] 'password' ]... ];
grant all on mydb.* to username@'1.1.1.1' identified by 'pwd';
DROP USER username@'ip'
delete from mydb.user where host = '%' and user = 'admin'
rename username to newname
mysqladmin -u username -p password 'newPassword'
update user set password = password('newPassword') where user = 'name'
set password = password('newPassword')
set password for 'name'@'%' identified by 'newPassword'
grant select on *.* to 'name'%'%' identified by 'newPassword'
service mysqld stop
mysqld_safe -skip-grant-tables &
mysql -uroot -p
(1) user mysql; (2) update user set password = password('') where user = 'root' and host = 'localhost'; (3) flush privileges;
service mysql restart;
mysqladmin password '123456'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。