待執(zhí)行的SQL文件(createuser.sql)–批量添加mysql賬戶的語(yǔ)句
grant all privileges on sq_hehe.* to hehe@localhost identified by “heiq”;
grant all privileges on sq_eili.* to eili@localhost identified by “eiglia”;
grant all privileges on sq_bob* to bob@localhost identified by “bo2esql”;
grant all privileges on sq_7car.* to 7car@localhost identified by “77sq”;
flush privileges;
執(zhí)行createuser.sql文件中的語(yǔ)句:
mysql -u用戶名 -p密碼 -h主機(jī)地址(localhost) < createuser.sql