0

I am installing new bugzilla server and importing old database to new bugzilla server

old mysql Server version : mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2

old OS Version: Debian GNU/Linux 5.0 \n \l

New Mysql Server Version : mysql Ver 14.14 Distrib 5.5.49, for debian-linux-gnu (x86_64) using readline 6.3

New OS Version: Debian GNU/Linux 8 \n \l

I am importing database like below

mysql -u root -p bugs < /home/chelsio/backup-05-25-2016-19-00.sql

I am getting below error

ERROR 1005 (HY000) at line 6237: Can't create table 'bugs.bugs' (errno: 150).

SHOW ENGINE INNODB STATUS; output

LATEST FOREIGN KEY ERROR

160527 10:27:59 Error in foreign key constraint of table bugs/bugs: FOREIGN KEY (component_id) REFERENCES components (id) ON UPDATE CASCADE, CONSTRAINT fk_bugs_product_id_products_id FOREIGN KEY (product_id) REFERENCES products (id) ON UPDATE CASCADE, CONSTRAINT fk_bugs_reporter_profiles_userid FOREIGN KEY (reporter) REFERENCES profiles (userid) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=30401 DEFAULT CHARSET=utf8: Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint. Note that the internal storage type of ENUM and SET changed in tables created with >= InnoDB-4.1.12, and such columns in old tables cannot be referenced by such columns in new tables.

I dont have any knowledge on mysql I am new mysql world. Please help.

GoneCase123
  • 388
  • 4
  • 15
  • 1
    related: http://stackoverflow.com/q/4061293/1331451, http://stackoverflow.com/q/825362/1331451 - probably you need to turn off constraint checking in your backup dump. – simbabque May 26 '16 at 16:26
  • 2
    Also, please [check your question history](http://stackoverflow.com/users/2739700/sagar?tab=questions) and accept answers that solved the respective problems. See [ask] and take the [tour] if you don't know how to do that. – simbabque May 26 '16 at 16:28
  • @Simbabque tried but no luck, SET FOREIGN_KEY_CHECKS=0; – GoneCase123 May 26 '16 at 16:57
  • 1
    @simbabque; sorry I used it properly now database imported correctly thanks – GoneCase123 May 29 '16 at 04:00

0 Answers0