从Linux shell执行sql文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了从Linux shell执行sql文件相关的知识,希望对你有一定的参考价值。

Ftp your *.sql file to the (remote) machine, login via SSH and then go to the directory where your sql file is and run this code.
  1. mysql <my_db_name> -u<user_name> -p<password> <mysql.sql

以上是关于从Linux shell执行sql文件的主要内容,如果未能解决你的问题,请参考以下文章

Linux下执行SQL文件

linux shell执行sql

Linux—编写shell脚本操作数据库执行sql

代码片段:Shell脚本实现重复执行和多进程

Shell脚本中执行sql语句操作

Linux shell 命令cd是怎么实现的?放在哪个文件夹?