外档本地路径规范 [英] Outfile local path specification

查看:69
本文介绍了外档本地路径规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何精确到本地计算机?

How do i exact to my local machine?

选择*到输出文件'C:\ Info \ table1.txt' 表格1中以','结尾的字段;

select * into outfile 'C:\Info\table1.txt' fields terminated by ',' from table1;

此查询在服务器上的info文件夹下创建为table1.txt,如何在此处指定我的本地计算机路径?

This query creates under info folder as table1.txt on the server, how do i specify my local machine path here?

谢谢.

推荐答案

您不能直接这样做. OUTFILE语法仅适用于服务器本身.但是,您可以执行以下操作:

You can't do it directly. The OUTFILE syntax only applies to the server itself. However, you can do :

c:\> mysql -u username -h nameofserver -p -e "SELECT ... FROM database.table WHERE ..." > c:\info\table1.txt

如果已将MySQL配置为允许来自计算机的远程连接.

if you've configured MySQL to allow remote connections from your machine.

这篇关于外档本地路径规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆