qinling072 发表于 2018-8-29 07:50:47

shell脚本进行数据库操作

  mysql
mysql -h${HOSTNAME} -P${PORT} -u${USERNAME} -p${PASSWORD} -e "sql语句"  

  
-hlocalhost -uroot -proot customer -e "select * from customer" > 1.txt
  参考文章:
  http://www.iyunv.com/database/201410/343557.html
shell编程—— EOF  http://blog.163.com/njut_wangjian/blog/static/1657964252013112152418345/


页: [1]
查看完整版本: shell脚本进行数据库操作