mysqlimport

mysqlimport: Error: 1045, Access denied

℡╲_俬逩灬. 提交于 2019-11-29 03:08:06
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: baz However... mysql -u someone -pwhatever Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 199 Server version: 5.1.41-3ubuntu12.10 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show grants; +--------------------------------------------------------------------------------

Disabling foreign key checks on the command line

痴心易碎 提交于 2019-11-28 16:58:37
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 error: ERROR 1217 (23000) at line 8: Cannot delete or update a parent row: a foreign key constraint fails I know about using SET FOREIGN_KEY_CHECKS=0 (and SET FOREIGN_KEY_CHECKS=1 afterward). If I add those to each .sql file then the import works. But then obviously on the next mysqldump those get overwritten. I also tried running it as a separate

MySQL import database but ignore specific table

半城伤御伤魂 提交于 2019-11-28 15:38:53
问题 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 tables, but ignore some of them? Thank you. 回答1: mysqlimport is not the right tool for importing SQL statements. This tool is meant to import formatted text files such as CSV. What you want to do is feed your sql dump directly to the mysql client with

mysqlimport: Error: 1045, Access denied

*爱你&永不变心* 提交于 2019-11-27 15:47:50
问题 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: baz However... mysql -u someone -pwhatever Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 199 Server version: 5.1.41-3ubuntu12.10 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement

Disabling foreign key checks on the command line

给你一囗甜甜゛ 提交于 2019-11-27 09:59:54
问题 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 error: ERROR 1217 (23000) at line 8: Cannot delete or update a parent row: a foreign key constraint fails I know about using SET FOREIGN_KEY_CHECKS=0 (and SET FOREIGN_KEY_CHECKS=1 afterward). If I add those to each .sql file then the import works. But