Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. PL/MySQL - can't load file

PL/MySQL - can't load file

Scheduled Pinned Locked Moved Database
sharepointmysql
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    noislude
    wrote on last edited by
    #1

    Good morning from Brazil. I'm running MySQL with root privileges and with the read and write permissions set but I still can't load a file with load_file:

    delimiter //
    drop procedure if exists sp_loadfile //
    create procedure sp_loadfile
    (
    p_file_name varchar(128)
    )
    begin
    declare my_text text;
    set my_text = load_file(p_file_name);
    select concat(p_file_name, ' has ', length(my_text), ' bytes.') as 'Output';
    end;
    //

    -rw-rw-rw- 1 eduardo eduardo 5 Set 1 11:04 test.txt

    mysql> call sp_loadfile('/var/www/mysql/PL_loadfile/test.txt');
    +--------+
    | Output |
    +--------+
    | NULL |
    +--------+
    1 row in set (0.00 sec)

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups