load-data-infile Questions

23

Solved

I have an unnormalized events-diary CSV from a client that I'm trying to load into a MySQL table so that I can refactor into a sane format. I created a table called 'CSVImport' that has one field f...
Photograph asked 3/9, 2010 at 11:10

15

I am importing some data of 20,000 rows from a CSV file into MySQL. Columns in the CSV file are in a different order than MySQL tables' columns. How can I automatically assign columns corresponding...
Nadinenadir asked 2/1, 2013 at 18:55

10

Solved

I have a file that can contain from 3 to 4 columns of numerical values which are separated by comma. Empty fields are defined with the exception when they are at the end of the row: 1,2,3,4,5 1,2,...
Bel asked 20/4, 2010 at 13:11

6

Solved

I have looked all over and found no solution, any help on this would be great. Query: LOAD DATA INFILE '/Users/name/Desktop/loadIntoDb/loadIntoDB.csv' INTO TABLE `tba`.`tbl_name` FIELDS TERMINA...
Maximalist asked 12/8, 2010 at 19:49

15

Solved

How can I import a CSV file into a MySQL table? I would like for the first row of data be used as the column names. I read How do I import CSV file into a MySQL table?, but the only answer was to u...
Measurable asked 18/6, 2012 at 6:22

11

Solved

I have one table spread across two servers running MySql 4. I need to merge these into one server for our test environment. These tables literally have millions of records each, and the reason the...
Hypothec asked 19/6, 2009 at 15:42

2

I have been using mysqlimport without problems for a long time, now as mysql 5.7 added json data type support, I'm trying to use mysqlimport with rows containing json data. Here is an example of a...
Rora asked 23/3, 2016 at 12:32

9

Solved

I am trying to load data into a table of my MySQL database, and getting this error. LOAD DATA LOCAL INFILE 'C:\Users\Myself\Desktop\Blah Blah\LOAD DATA\week.txt' INTO TABLE week; Reference: th...
Responsiveness asked 22/4, 2014 at 23:59

12

I use MySQL queries all the time in PHP, but when I try LOAD DATA INFILE I get the following error #1045 - Access denied for user 'user'@'localhost' (using password: YES) Does anyone know...
Transpadane asked 8/2, 2010 at 11:54

3

Solved

For loading huge amounts of data into MySQL, LOAD DATA INFILE is by far the fastest option. Unfortunately, while this can be used in a way INSERT IGNORE or REPLACE works, ON DUPLICATE KEY UPDATE is...
Pachton asked 7/3, 2013 at 12:25

4

Last week this was working, and today it isn't. I have not changed the php file. All I have done in the interim is run apt-get update on my Ubuntu 15.04 server. The MySQL statement I have is: LOA...
Giron asked 10/6, 2015 at 15:33

2

Solved

I am loading a CSV file using MySQL's LOAD DATA INFILE but only half the rows load. I have tested different files and exactly half of the rows will load every time. How can I get all the rows to lo...
Scrappy asked 9/7, 2013 at 18:22

8

Solved

I'm trying to import a very large .csv file (~4gb) into mysql. I was considering using phpmyadmin, but then you have a max upload size of 2mb. Someone told me that I have to use the command line. ...
Linzer asked 7/7, 2011 at 4:18

5

Solved

We're moving our database from being on the webserver to a separate server (from an Amazon EC2 webserver to an RDS instance.) We have a LOAD DATA INFILE that worked before that is going to need th...
Nonobedience asked 22/10, 2012 at 17:42

6

Solved

How do we deal with field with comma when using load data infile? i have this query: $sql = "LOAD DATA LOCAL INFILE '{$file}' INTO TABLE sales_per_pgs FIELDS TERMINATED BY ',' LINES TERMINATED ...
Fillbert asked 1/8, 2012 at 12:27

5

I am using MySQL LOAD DATA LOCAL INFILE command and I get this error: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1148 The used command is not allowed with this MySQL version...
Oversight asked 10/10, 2012 at 12:13

3

Solved

I'm trying to Load a CSV file into my MySQL database, But I would like to skip the first line. I fact It contains the name of my columns and no interesting data. Here is the query I'm using: LOA...
Manet asked 24/10, 2009 at 15:59

9

Solved

I need a way to easily export and then import data in a MySQL table from a remote server to my home server. I don't have direct access to the server, and no utilities such as phpMyAdmin are install...
Brawley asked 17/9, 2008 at 10:45

2

I know this has been asked before but I could not find any newer posts that could be of help. LOAD DATA LOCAL INFILE has been working perfectly up until today. I have not changed anything other tha...
Amish asked 23/4, 2019 at 19:59

1

Solved

After reading several answers on here, I finally figured out why my .csv file wasn't loading in through the command prompt. I had to enable load data local infile. Once I did that, I read the globa...
Fractionate asked 11/2, 2019 at 3:23

3

I am trying to upload a tab delimitted file with MySQL. I want a query something likes this: LOAD DATA LOCAL INFILE 'file' INTO TABLE tbl FIELDS TERMINATED BY 'TAB' Is there something I can subsitu...
Superstructure asked 6/4, 2010 at 0:34

3

Solved

I ran into some trouble using LOAD DATA INFILE command as i wanted to ignore the lines that was already in the data base..say if i have a table with data as follows, id |name |age ----------------...
Mezcaline asked 15/10, 2012 at 7:51

2

I need to update existing rows in table with load data infile based on some condition, is this possible? load data infile 'E:/xxx.csv' into table tld_tod @aaa, @xxx_date, @ccc fields terminated b...
Behlau asked 21/7, 2010 at 6:41

5

In MySQL I've used LOAD DATA LOCAL INFILE which works fine. At the end I get a message like: Records: 460377 Deleted: 0 Skipped: 145280 Warnings: 0 How can I view the line number of the records ...
Cardigan asked 30/4, 2010 at 17:29

1

I have wordpress website and have created plugin to import csv to a table. Database is in RDS. Here is the sql I have used LOAD DATA LOCAL INFILE 'my.csv' INTO TABLE tablename CHARACTER SET UTF8...
Eyecatching asked 10/4, 2016 at 5:17

© 2022 - 2024 — McMap. All rights reserved.