mysql outfile 文件已存在,mysql-可以选择…到outfile中,而不是将其保存到文件中,而是将其保存在blob中...

我想从x到输出文件’c:/test.csv’中进行选择*.

但是,我不想将其保存到outfile test.csv中,而是将其保存到blob字段中.

我正在从Windows上的客户端开始查询.

MySQL服务器在Windows或Linux(可以是两者)上的服务器上.

但是我想让文件在客户端,而不是在服务器上.

BTW

该客户端软件是用Delphi 2007编写的,并使用ZEOS连接到远程服务器上的MySQL数据库.

如何获得Outfile客户端而不是服务器端?

解决方法:

Johan,MySql从正在运行的服务器执行此语句.在客户端创建文件的唯一方法是传递指向客户端计算机的共享文件夹位置和文件名. MySQL服务(守护程序)所有者还必须具有足够的特权才能写入目标目录.

The SELECT … INTO OUTFILE statement

is intended primarily to let you very

quickly dump a table to a text file on

the server machine. If you want to

create the resulting file on some

other host than the server host, you

normally cannot use SELECT … INTO

OUTFILE since there is no way to write

a path to the file relative to the

server host’s file system.

However, if the MySQL client software

is installed on the remote machine,

you can instead use a client command

such as mysql -e “SELECT …” >

file_name to generate the file on the

client host.

It is also possible to create the

resulting file on a different host

other than the server host, if the

location of the file on the remote

host can be accessed using a

network-mapped path on the server’s

file system. In this case, the

presence of mysql (or some other MySQL

client program) is not required on the

target host.

标签:zeos,windows,mysql,delphi,delphi-2007

来源: https://codeday.me/bug/20191102/1993495.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值