When installing a UDF recently I got an annoying error message, which didn’t seem to want to go away. Deleting the function before attempting to remove it did not work so I used the following set of escalating commands to attempt to get it to install.

But back to the error for a moment:

bash > mysql -u user -p < installdb.sql
Enter password:
ERROR 1125 (HY000) at line 7: Function 'lib_mysqludf_ssdeep_info' already exists

This can be solved really simply with the following options:

  1. Attempt to delete the function and then reinstall it
  2. Delete the function row from the mysql.func table and then reinstall it
  3. Stop the MySQL server (after trying option 2), start it again and then reinstall it