dannykopping / mysql-utilities

Github clone of BZR library
https://code.launchpad.net/~mysql/mysql-utilities/trunk
GNU General Public License v2.0
13 stars 6 forks source link

MySQL error: 150 #5

Open sytolk opened 10 years ago

sytolk commented 10 years ago

I try to copy to my localhost database but I have error:150 this is foreign key error. Can you disable foreign key check like this:

SET FOREIGN_KEY_CHECKS = 0; some code that gives you errno: 150 SET FOREIGN_KEY_CHECKS = 1;

mysqldbcopy --source=root@192.168.1.3:3306 --destination=root@localhost:3306 database1:database2
# Source on 192.168.1.3: ... connected.
# Destination on localhost: ... connected.
# Copying database driver_android renamed as driver_android
# Copying TABLE driver_android.advertisement
# Copying TABLE driver_android.adv_impressions
# Copying TABLE driver_android.adv_sequence
# Copying TABLE driver_android.articles
# Copying TABLE driver_android.articles_parameter
# Copying TABLE driver_android.billing
# Copying TABLE driver_android.campaigns
# Copying TABLE driver_android.cars
ERROR: Cannot operate on TABLE object. Error: Query failed. 1005: Can't create table 'driver_android.cars' (errno: 150)
sytolk commented 10 years ago

error with strings..

ERROR: Problem inserting data. Error = Query failed. 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1, 1, 0, t_sm_roxy1.jpg, None, roxy1.jpg, '2009-12-04', '2010-04-04', 0), (2, R' at line 1