使用叹号(!)禁止用户终端进入的一个方法。
代码如下:
mysql> grant all privileges on wubx.* to ‘wubx’’172.16.100.185′ identified by ‘fd52!wubx&,’;
Query OK, 0 rows affected (0.00 sec)
mysql>quit;
#mysql -h 172.16.100.185 -u wubx -pfd52!wubx&,
-bash: !wubx,: event not f
代码如下:
# vi mysqlusers.txt
create database dataname;
grant all privileges on dataname.* to usernamelocalhost identified by ‘password‘;
flush privileges;
# /usr/local/mysql/bin/mysql -u root -p password < mysqlusers.txt
蓝色斜体部分为对应的用户名和密码,添加多个用户及数