Error 1436 & error 1062

Discussion in 'MySQL' started by mnaseersj, May 13, 2012.

  1. #1
    Hi All,

    I was trying to import Sakilla database and ran into some problem and would be grateful if someone could help me out please.

    I ran the following command successfully :

    /usr/local/zend/mysql/bin/mysql -u root -p < sakila-schema.sql 
    Code (markup):
    but When I ran this command :

    /usr/local/zend/mysql/bin/mysql -u root -p < sakila-data.sql
    Code (markup):
    I got an error after typing my password :

    ERROR 1436 (HY000) at line 81: Thread stack overrun: 5752 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack.

    I tried running it a second time and I got the following output :

    ERROR 1062 (23000) at line 26: Duplicate entry '1' for key 'PRIMARY'

    Once again I would be grateful if you could help me out please.

    Many Thanks,
     
    mnaseersj, May 13, 2012 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    For your first error you need to increase value for thread_stack in MySQL configuration file i.e. /etc/my.cnf. Restart the MySQL server after increasing the value.

    The reason of the second error is that some data had already been imported when you executed the command first time. To get rid of the duplicate key error, delete all the data you imported and try again.
     
    mwasif, May 13, 2012 IP
  3. mnaseersj

    mnaseersj Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    thx, I have changed a setting in my my.cnf file and that did the trick.
     
    mnaseersj, May 13, 2012 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    You are welcome
     
    mwasif, May 13, 2012 IP