I am trying to import a database and have run into a couple of errors I cannot get around.
First I run the below:
/my/location/mysql/bin/mysql -u root -p < my-db-schema.sql
Then when I run:
/my/location/mysql/bin/mysql -u root -p < my-db-data.sql
But after giving my password I get:
ERROR 1436 (HY000) at line 80: Thread stack overrun: 5850 bytes used of a 142083 byte stack, and 127888 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack.
I tried running it again and now I get:
ERROR 1062 (23000) at line 25: Duplicate entry '1' for key 'PRIMARY'
I would be very grateful if somebody could explain why this might be happening maybe how to fix.
thanks
So the first error is relating to MySQLs thread_stack value. It needs to be increased inside the config file in /etc/my.cnf.
Be sure to restart your MySQL instance after increasing it.
The second error is related to the first error in that it seems to be due to the system already having data to be imported when you ran the command the first time. The easiest way to get rid of the duplicate key error is to delete all the data you imported and then try again.
Hope that helps