复制代码 代码如下:# vi
mysqlusers.txtcreate database dataname;grant all privileges on
dataname.* to username@localhost identified by ‘password‘;flush
privileges;# /usr/local/mysql/bin/mysql -u root -p password
mysqlusers.txt

vi mysqlusers.txt create database dataname ;
grant all privileges on dataname .* to username @localhost identified
by password ; flush privileges; # /usr/local/mysql/bin/mysql
-u…

以上内容给大家分享了mysql通过文档读取并执行命令之快速为mysql添加多用户和数据库技巧,希望大家喜欢,关于数据库内容请持续关注本站,本站每天都有新的内容更新

# vi mysqlusers.txt

create database dataname;
grant all privileges on style=”color: #3366ff”>dataname.* to style=”color: #3366ff”>username@localhost identified by ‘ style=”color: #3366ff”>password‘;
flush privileges;

# /usr/local/mysql/bin/mysql -u root -p style=”color: #3366ff”>password < mysqlusers.txt

Author

发表评论

电子邮件地址不会被公开。 必填项已用*标注