Search Engine: Elastic

Article ID: 131348, created on Aug 24, 2017, last review on Aug 24, 2017

  • Applies to:
  • Operations Automation 7.0


Task "Add access host for database database_name on database server on host" fails with the following error message:

MySQL API error:Duplicate entry '' for key 'PRIMARY'.

The same can be seen in /var/log/pa/core.log on the Management Node:

Aug 17 12:34:56.991 : DBG [task:91812341:3597984 1:25545:af4ffb70 MySQL ]: [ db::mysql::connection::exec] INSERT INTO db(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Create_tmp_table_priv,Lock_tables_priv,Create_view_priv,Show_view_priv,Create_routine_priv,Alter_routine_priv,Execute_priv,Event_priv,Trigger_priv) VALUES('', 'db1234_dbname', 'u1231_name','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y')
Aug 17 12:34:56.992 : DBG [task:91812341:3597984 1:25545:af4ffb70 lib ]: [ MySQL] {module_id="Databases"; code="610"} MySQL API error: Duplicate entry '' for key 'PRIMARY'.


The issue is caused by an existing duplicate entry in MySQL database.

Most probably the duplicate record was added with API method before. When Operations Automation tries to add the same record again during execution of the DB creation task, it fails.


Contact Odin Technical Support to resolve the issue.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 0871c0b47b3b86ae3b1af4c2942cd0ce 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF