当前位置: 技术问答>linux和unix
我在执行shell时,想在shell里直接向mysql数据库插入数据,我该如何写shell。
来源: 互联网 发布时间:2015-10-07
本文导语: 我在执行shell时,想在shell里直接向mysql数据库插入数据 grant all privileges on *.* to cydg@localhost identified by '8411' with grant option; shell语句该如何写 另外,有一写命令执行时需要输入国家地区邮件公司什么的,直接...
我在执行shell时,想在shell里直接向mysql数据库插入数据
grant all privileges on *.* to cydg@localhost identified by '8411' with grant option;
shell语句该如何写
另外,有一写命令执行时需要输入国家地区邮件公司什么的,直接写shell的话会被略去,
我又该何去写shell呢
grant all privileges on *.* to cydg@localhost identified by '8411' with grant option;
shell语句该如何写
另外,有一写命令执行时需要输入国家地区邮件公司什么的,直接写shell的话会被略去,
我又该何去写shell呢
|
#!/bin/sh
echo "
grant all privileges on *.* to cydg@localhost identified by '8411' with grant option;
quit
" | mysql
echo "OK!"
echo "
grant all privileges on *.* to cydg@localhost identified by '8411' with grant option;
quit
" | mysql
echo "OK!"
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。