i need insert contant of .txt file mysql table. command this, i'm having problems load_file: (already tried absolut , relative path file)
file="load_file('/home/vector5/scripts/log_backup_hg3diessetmana.txt')" mysql --host=localhost --user=myuser --password=mypassword vector5_aplogis2 << eof insert tablenamebackups(data,tipus,titol,text) values('2015-06-02 00:47:17','111','asdadad',$file); eof
and error have, looks not reading file. i've tried no luck:
error 1048 (23000) @ line 1: column 'text' cannot null
looks $taulaausar
undefined. check if contains table name.
update
$file null make sure file exists. think have add complete path it.
Comments
Post a Comment