0
votes
1answer
18 views

Using mysql's load infile to only populate certain columns

I have a csv file with a lot of data in it and I want to upload it into a mysql table. However, I would like to keep one column (primary id) empty so I can edit it myself. In mysql's documentation it ...
0
votes
0answers
42 views

Match unique id's on import- csv to sql

I have a csv file that I would like to import into a phpMyAdmin database (Wordpress). The CSV file is formatted as shown below: list-id | post_title | slider | ...
0
votes
1answer
676 views

Inserting all csv files into a table in mySQL?

I am looking for a way to insert all my csv files into mySQL without having to write several "LOAD DATA INFILE" statements as I have many csv files I need to insert and the files themselves are very ...
1
vote
1answer
3k views

MySQL import csv file ERROR 13 (HY000): Can't get stat of /path/file.csv (Errcode: 2)

I am an absolute beginner to MySQL (5.5.34) / Linux (Ubuntu 12.04 LTS)` I have created a simple database with one table. When trying to import data into it via a 'data_test.csv file an error message ...
1
vote
1answer
133 views

Looking for an efficient way to clone tens of millions of database records

A laboratory I work in is attempting to clone the open, biochemical database managed by PubChem found here. (Please don't ask why, I am not in charge of this project, I am simply tasked with the ...
1
vote
1answer
73 views

Can I create a MySQL CSV table directly from an existing CSV file?

MySQL has a CSV storage engine. I'm wondering if I could create such a table directly from an existing CSV file. Made up command as example: CREATE TABLE test (i INT NOT NULL, c CHAR(10) NOT NULL) ...
0
votes
0answers
18 views

Export database in one file with every dataset existing

I've got a unusual question. The human resources needs to export an old DB to a new one. And the guys managing the new DB wants one csv file with every dataset existing. I did a Relational database ...
1
vote
2answers
254 views

Import CSV file into Mysql with Multiple Delimiters/Field Separators

I'm trying to import a large csv file into Mysql. Unfortunately, the data within the file is separated both by spaces and tabs. As a result, whenever I load the data into my table, I end up with ...
0
votes
0answers
267 views

CSV File Into MYSQL Merging - LOAD DATA on Duplicate Key?

Hey Dba Stack Exchange, My question to you is with regards to mysql. Right now I have a medium to small sized csv with 25k lines I need imported into mysql for a client. Problem is, their is only ...
0
votes
1answer
448 views

Dealing with empty strings while loading a table from a CSV

I am trying to load a CSV file into a table. The CSV file contains some empty strings for example: 1,2,,4 I want to load the empty field as null. One way I know is to use \N i.e: 1,2,\N,4 but it ...
1
vote
2answers
1k views

Loading data in mysql using LOAD DATA INFILE, replication safe?

I am trying to load data into mysql database form CSV file. I found that we could use LOAD DATA INFILE command to do it. But as per the mysql documentation it is not replication safe. (See here) Is ...
2
votes
1answer
583 views

excel sheet input to mysql

I want to add about 1000 records to a table that contains 31 fields. The worst part is those 1000 records are in the form of an excel sheet having some columns left unfilled. Is there any easy way to ...
4
votes
1answer
551 views

MySQL Import CSV with Multiple Field Separators

I'm trying to import this CSV file into MySQL that appears to be optionally enclosed by more than one character. Unfortunately, MySQL only supports one character as a field separator. I am stuck ...
1
vote
1answer
787 views

MySQL import csv only gets half the lines

I use the following command to read in a csv: LOAD DATA INFILE '/Users/Tyler/Desktop/players_escaped.txt' INTO TABLE players FIELDS TERMINATED BY ',' ENCLOSED BY '^' LINES TERMINATED BY '\n'; The ...
2
votes
2answers
6k views

MySQL - CSV UPDATE (not INSERT) into existing table?

I have a table with the following columns: id | name | city The table has 1000 entries in it. I have a CSV file with a limited number of lines like this: id,city 34,Denver 45,Kansas City 145,New ...
2
votes
3answers
399 views

What's the easiest way to re-format CSV exports from MySQL into Excel/ flat-file fields?

I've just had some database backup problems on a website I run containing some important lead data. Unfortunately, I've now lost one of the key MySQL tables, which means my data has lost its ...