#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    139
    Rep Power
    10

    How do I make errors like "Duplicate entry" show up in mysql logs?


    The Error log only shows "critical" errors.
    The General Query log only shows the attempted queries without the errors.
    I've got about 13 million rows I'll be inserting, and I want to be able to see in the logs the particular Inserts that caused duplication errors like the one below. Any suggestions?

    PHP Code:

    mysql
    source /home/www/blah.com/setup/mytable.sql 
    Query OK
    1 row affected (0.06 sec)  
    Query OK1 row affected (0.01 sec)  
    Query OK1 row affected (0.00 sec)  
    ERROR 1062 (23000): Duplicate entry 'apple-cs' for key 'name_2' 
    Query OK1 row affected (0.00 sec
    Thanks.

    mysql Ver 14.14 Distrib 5.5.32, for debian-linux-gnu (i686) using readline 6.2
    Last edited by dano2; August 31st, 2013 at 07:05 PM.
    Thanks,
    Dan

    Operating system ubuntu 12.04
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    139
    Rep Power
    10
    Anyone know if this is doable?
    Thanks,
    Dan

    Operating system ubuntu 12.04

IMN logo majestic logo threadwatch logo seochat tools logo