Questions tagged [mysql-loadfile]
33 questions
1
vote
0 answers
Other Language(Chinese) character chenge in to ??????? Mysql Load Query
I have a csv File in that few columns are containing Chinese words,
I am uploading the csv file in Mysql Table using Query:
LOAD DATA local INFILE '/CsvFile.csv' INTO TABLE mytableName FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES…

ansh
- 573
- 3
- 9
- 26
1
vote
1 answer
MySQL Load File and Apostrophe
I have a text file which contain 2 field sepearated by | and record by new line
example:
L'EQUME|7A
Voley|18
L'olivier|158
i have a MySql Table with 3 column (id, name , val)
//id autoincrement...
so i would like to use the mysql load file feature…

Krasic
- 137
- 2
- 14
1
vote
1 answer
Conditional load using data file in mysql
I am trying to load a file with a condition using mysql
GIFTCARDS (table):
id| store | amount |
1 | starbucks| |
2 | target | |
3 | starbucks| |
4 | target | |
5 | target | …

P D
- 17
- 2
1
vote
1 answer
How do I use LOAD_FILE to insert value from a file into a table?
I tried to insert a text file into my database, using this code:
INSERT INTO test.table (url_address, html)
VALUES ('abc', LOAD_FILE('C:\Documents and Settings\eran\Desktop\1.txt'));
However, I get null in the html column. How can I get the data…

eran
- 41
- 2
0
votes
0 answers
Stored procedure not able to read csv file through filepath via LOAD_FILE()
I want to create a stored procedure in mySQL workbench which reads a csv file from a path. I have made all required changes in my.ini file, set file path, secure_file_priv = "my/file/path", username is having 'file permission'. folder in which I…

Be_BhavitaSoam
- 11
- 3
0
votes
1 answer
How can a CSV file with some empty cells be loaded into MySQL?
I am trying to import a CSV with some empty cells into MySQL database. I Could you please help me with that?
My last thread was closed since it was "associated with similar question". I tried the solution and it didnt work, the attempt on that is…

Clone
- 3,378
- 11
- 25
- 41
0
votes
1 answer
MySQL Character Set and Collate
I use MySQL 5.7, but I do not know how to config it to display Vietnamese correctly.
I have set
CREATE DATABASE brt
DEFAULT CHARACTER SET utf8 COLLATE utf8_vietnamese_ci;
After that I used "LOAD DATA LOCAL INFILE" to load data written by…
0
votes
0 answers
Error loading MySQL/MariaDB Inline Data With Unescaped Double Quotes In Fields
I am having essentially the same problem as described here but the issue was left unresolved in that question.
I am trying to import a series of data files totaling about 100 million records into a MariaDB database. I've run into issues with some…

Ben Franske
- 330
- 2
- 11
0
votes
0 answers
My photo field still showing null in my table structure after inserting images using mysql statement
use work;
update applicants
set photo = (load_file("C:\Users\CEO\Pictures\MY PHOTOS\OT.jpg"))
where ID = 2001;
When I execute the query in MySQL workbench, it runs successfully, displaying 0 row(s) affected Rows matched: 1 Changed: 0 Warning …

CCCC
- 241
- 2
- 10
0
votes
1 answer
Why isn't MySQL inserting rows from CSV file? I've been using LOAD DATA INFILE wrong?
I have a CSV file containing rows just like the following one:
2,1,abc123,1,2,"Hello World"
2,1,abc123,1,2,"Hello World2"
2,1,abc123,1,2,"Hello World3"
I'm running the following query:
LOAD DATA LOCAL INFILE :path INTO TABLE errors
CHARACTER SET…

Alexandru
- 833
- 1
- 8
- 24
0
votes
2 answers
MySQL load ignores some records
I have this CSV file with about 16.916 records. When I load this into a MySQL, it only detects 15.945 records.
Thats what MySQL says:
Records: 15945 Deleted: 0 Skipped: 0 Warnings: 0
Can someone tell my why MySQL ignores some records and how I…

Peter
- 1,679
- 2
- 31
- 60
0
votes
1 answer
Errcode: 13 when loading data into SQL Database
Attempting to load a file into the DB.
CREATE TEMPORARY TABLE IF NOT EXISTS tt_emails (
id INT PRIMARY KEY AUTO_INCREMENT,
util_account_id VARCHAR(40) NULL,
email VARCHAR(344) NOT NULL,
optout INT NOT NULL
);
LOAD DATA INFILE…

Asif
- 748
- 3
- 9
- 32
0
votes
2 answers
Cant get stat of 'var/lib/mysql/ (Errcode:2)
this code with the path works fine for me in localhost
$sql = "LOAD DATA INFILE 'C://xampp/htdocs/xampp/www/tool/".@mysql_escape_string($this->file_name).
"' INTO TABLE `".$this->table_name.
"` FIELDS TERMINATED BY…

black
- 729
- 5
- 13
- 28
0
votes
1 answer
MySql LOAD_FILE bizzare permission issue?
I admin a website at work that was the victim of a SQL injection attack. By examining the logs, it appears the attacker used sqlmap with the file-read option and grabbed a bunch of config files from the server, due to our web developer being sloppy…

InfernusDoleo
- 139
- 9
0
votes
2 answers
error with MySQL load data infile field with double quotes
I have .csv file data like this:
"UPRR 38 PAN AM "M"","1"
and I loaded data into table using below command which is having two columns (a and b).
LOAD DATA LOCAL INFILE 'E:\monthly_data.csv'
INTO TABLE test_data_table
FIELDS TERMINATED BY…

sagarpavan
- 85
- 2
- 14