Click here to Skip to main content
15,569,774 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi , i was learning some SQL-injection , i type this in mysql console :
mysql> select count(*),concat((select user()),floor(rand()*2)) as a from informa
tion_schema.tables group by a
;
and after i enter the same query twice i face this error msg :
ERROR 1062 (23000): Duplicate entry 'root@localhost0' for key '<group_key>'


can you tell me why i face this error ?

What I have tried:

i search in google, but i dont understand .
Posted
Updated 14-May-17 22:06pm

Typically this error means that <group_key> only allows unique values and you already have 'root@localhost0' in that column.

This probably explains why it works the first time, but not the second time.
 
Share this answer
 
Thanks man , you Made my day :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900