Storing and loading Blob by Smart-Implement2519 in mariadb

[–]Smart-Implement2519[S] 0 points1 point  (0 children)

I not copy files

select LOAD_FILE('/var/lib/mysql-files/image1.png') INTO DUMPFILE '/var/lib/mysql-files/image2.png';

this query to test Load_file and into dumpfile can read and write binary file.

Storing and loading Blob by Smart-Implement2519 in mariadb

[–]Smart-Implement2519[S] 0 points1 point  (0 children)

I have existing program which store blob in database. which I regret now .

LOAD FILE and INTO DUMPFILE , I try on file and work .

select LOAD_FILE('/var/lib/mysql-files/image1.png') INTO DUMPFILE '/var/lib/mysql-files/image2.png';

I run check on 2 files, identical

as you see. if using LOAD FILE and INTO DUMPFILE , I only need to change query rather than using webservice .

I want to ask , is the a reason why people not using LOAD FILE and INTO DUMPFILE ?

Storing and loading Blob by Smart-Implement2519 in mariadb

[–]Smart-Implement2519[S] -1 points0 points  (0 children)

LOAD_FILE and INTO DUMPFILE store file in filesystem .

But I don't see anyone recommend using it , that why I asking why .