sql - MySQL source command contacting remote host -
sorry if has been asked before and/or dead stupid, couldn't find looking for.
i want populate fresh, empty mysql db using .sql scripts. log mysql, switch desired db , use source /path/to/script.sql
in order load sql script db. works fine, if mysql server on same machine scripts, i'm having problems if hosts different.
so, there parameter source
command issue remote host? or wise option scp
.sql file in question db host?
ps: know can mysql -h host -u user -p somedb < /path/to/script.sql
prefer source method, in past did not output mysql when using option compared source
.
thanks lot.
there's no option in source
reference remote host. it's reference relative local system.
so, yes scp file remote host. either that, or you'd need remote file system mounted (e.g. nfs, or mapped drive letter in windows) appears local file system.
Comments
Post a Comment