You can imagine where it goes from here…

MySQL undefined “user”

I saw this odd exception today:


Caused by: java.sql.SQLException: There is no 'anotherdeveloper'@'localhost' registered
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:116

This happens after my server has started up, I’ve logged in through the web app, browsed around and then try to insert a message. It’s a little puzzling at first, how can the database user just change midstream. It turns out that it’s caused by a trigger trying to fire but the DEFINER for the trigger is set to “otherdeveloper@localhost” which is not a valid account on my local database. Would be nice if mysql import warned you about this or perhaps change it to the user the schema is being imported as if the DEFINER does not exist.

February 27, 2007 - Posted by | Tech

1 Comment »

  1. It kind of looks like they nailed on triggers at the last minute. Oh, that’s right they did.

    I’m not complaining, MySQL is at least 3Gb small than Oracle and infinitely cheaper.

    Comment by Craig Baker | February 28, 2007


Leave a comment