LOAD_FILE returns NULL

前端 未结 4 746
忘了有多久
忘了有多久 2020-12-19 14:41

I am trying to insert an image into my MySQL server. I have done some research and it looks like the best way to do that is through LOAD_FILE(). However,

4条回答
  •  情书的邮戳
    2020-12-19 15:18

    I had the same issue.

    Fond out that the file to be loaded, needs to be in the folder location where mysql/mariadb has privileges to read it. It can be configured, BUT the data folder is already has access right.

    In my case I copied my file to data folder: C:\Program Files\MariaDB 10.3\data And than I just called it with full path:

    select load_file('C:\\Program Files\\MariaDB 10.3\\data\\test.txt');
    

提交回复
热议问题