将远程表导入远程 mysql 服务器
我想将大型 csv/txt/tsv 文件导入 mysql 服务器数据库。该文件位于大学的远程计算机上,我可以通过 ssh 访问该计算机。 mysql 数据库(和服务器)位于同一台远程计算机上。我一直尝试使用 Navicat 将此文本文件导入远程数据库但无济于事。
有没有一种简单的方法可以做到这一点,而无需先下载(非常大的)文件,然后将其上传到 mysql?
I want to import a large csv/txt/tsv file into a mysql server database. The file is sitting on a remote machine at University which I have access to via ssh. The mysql database (and server) are sitting on the same remote machine. I have been trying to use Navicat to import this text file into the remote database to no avail.
Is there a simple way to do this without first downloading the (very large) file then uploading it to mysql?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 SQL YOG
use SQL YOG
您可以编写简单的 bash 脚本,将 csv/txt/other 转换为 sql。
You may write simple bash script that will convert csv/txt/other to sql.
LOAD DATA INFILE 将执行您想要的操作。它可以处理本地(到服务器)和本地(到您)文件。
LOAD DATA INFILE will do what you want. It can handle both local (to the server) and local (to you) files.