我有一个本地mysql转储,我想将其复制-插入到远程数据库中:
mysqlimport --host=192.168.xxx.xxx --user=username --password=password remote_table /tmp/export.txt结果:mysqlimport: Error: 1290, The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
那么,我如何告诉我的远程mysql服务器接受来自远程机器的导入呢?
发布于 2019-10-14 18:34:59
i)如下所示获取mysql转储
mysqldump -u user -p db--p> db-name.out
ii)使用sftp/ssh将db-name.out文件复制到远程MySQL服务器:
scp db-name.out user@remote.box.com:/remoteBoxDirectory
iii)在远程服务器上恢复数据库(通过ssh登录):
mysql -u用户名db- -p < db-name.out或mysql -u用户名‘-p’db-name < db-name.out
https://stackoverflow.com/questions/58374832
复制相似问题