Questions tagged [mysqlimport]

The mysqlimport client provides a command-line interface for the MySQL database to the LOAD DATA INFILE SQL statement.

The mysqlimport client provides a command-line interface for the MySQL database to the LOAD DATA INFILE SQL statement.

Related tag

209 questions
71
votes
7 answers

Disabling foreign key checks on the command line

I have a backup script for my MySQL database, using mysqldump with the --tab option so it produces a .sql file for the structure and a .txt file (pipe-separated) for the content. Some tables have foreign keys, so when I import it I'm getting the…
DisgruntledGoat
  • 70,219
  • 68
  • 205
  • 290
57
votes
9 answers

How to ignore certain MySQL tables when importing a database?

I have a large SQL file with one database and about 150 tables. I would like to use mysqlimport to import that database, however, I would like the import process to ignore or skip over a couple of tables. What is the proper syntax to import all…
DanielAttard
  • 3,467
  • 9
  • 55
  • 104
30
votes
3 answers

Mysql ERROR: ASCII '\0' while importing sql file on linux server

I am getting following error while importing sql file ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is…
zish
  • 607
  • 2
  • 6
  • 15
23
votes
5 answers

mysqlimport: Error: 1045, Access denied

Does anyone know why I get this error when running mysqlimport? mysqlimport -u someone -pwhatever --columns=a,b,c,d,e bar /var/tmp/baz.sql mysqlimport: Error: 1045, Access denied for user 'someone'@'%' (using password: YES), when using table:…
Mike Conigliaro
  • 1,144
  • 1
  • 13
  • 28
23
votes
3 answers

How to use mysqlimport to read in result of mysqldump --databases

I have successfully dumped an entire MySQL database using mysqldump --databases generating a nice .txt file. However, I can't see how to read the whole file back into MySQL in one go; mysqlimport seems to want just one table at a time.
Charles Anderson
  • 19,321
  • 13
  • 57
  • 73
17
votes
1 answer

MySQL data export changes times

I have some backup and restore scripts that I am using for my database. The table has a timestamp field. The backup script looks like this: mysqldump -u user -ppass database --tab="../" --fields-terminated-by="|" --skip-comments table It creates…
DisgruntledGoat
  • 70,219
  • 68
  • 205
  • 290
15
votes
2 answers

Is it not possible to show warnings when using mysqlimport?

This article: http://www.linuxask.com/questions/how-to-show-the-warnings-during-mysqlimport says it is not possible to show warnings when using mysqlimport: When you use mysqlimport to import data from text file, the number of warnings will be…
jerrygarciuh
  • 21,158
  • 26
  • 82
  • 139
14
votes
4 answers

Using mysqlimport where the filename is different from the table name

I've been playing with mysqlimport and I've run into the restriction where the filename has to be the same as the table name. Is there any way to work round this? I can't rename the file as it is used by other processes and I don't want to copy the…
Mike Q
  • 22,839
  • 20
  • 87
  • 129
13
votes
3 answers

Maintain case sensitivity when importing db into windows

I have an export from a MYSQL database on a linux machine however when importing that database into MYSQL on windows all of the table names that were camel cased are now all lower case. The sql dump has the correct case in it but the importing via…
user103219
  • 3,209
  • 11
  • 39
  • 50
13
votes
1 answer

MySQL Incorrect DateTime Value for Date older than 1980

While, trying to import a .sql file into my database, I am getting the following error for one of the insert statements - ERROR 1292 (22007) at line 31504: Incorrect datetime value: '1936-01-31 00:00:00' for column 'BatchDate' at row 1. Operation…
Prmk
  • 175
  • 2
  • 2
  • 13
9
votes
2 answers

MySql Error 'max_allowed_packet' bytes during import SQL script on database hosted on AWS RDS

I was facing an issue during import SQL file on MySql database which is on AWS RDS, during import SQL file initial table was imported then suddenly it shows an error. I know this error and I can solve this by increasing max_allowed_packet size in…
8
votes
1 answer

Syntax error when importing mysql table with html code in it

Im trying to import a mysql table with data that has html code in it and it generates syntax error. Can someone tell me how to properly import mysql with html code Sytanx error : You have an error in your SQL syntax; check the manual that…
Cadz
  • 139
  • 3
  • 21
7
votes
1 answer

Any way to disable foreign key checks with mysqlimport tab option?

I asked this question before and I am just coming back to the issue. I have a backup script for my MySQL database, using mysqldump with the --tab option so it produces a .sql file for the structure and a .txt file (pipe-separated) for the…
DisgruntledGoat
  • 70,219
  • 68
  • 205
  • 290
6
votes
1 answer

How to import LARGE sql files into mysql table

I have a php script that parses XML files and creates a large SQL file that looks something like this: INSERT IGNORE INTO table(field1,field2,field3...) VALUES ("value1","value2",int1...), ("value1","value2",int1)...etc This file adds up to be over…
nick
  • 2,743
  • 4
  • 31
  • 39
6
votes
2 answers

mysqlimport: Error: 1227 Access denied with MySQL 8.0 and Amazon RDS

We are using MySQL 8.0.* and .csv file for the importing data into Amazon RDS. We are executing this command from the app server command line. Error: mysqlimport: Error: 1227 Access denied; you need (at least one of) the SUPER,…
1
2 3
13 14