Monday, September 8, 2008

On Duplicate Key Update

This morning I was trying to copy a permissions-customized mysql.users table from the production server to its backup and development servers. Of course in about 2 seconds, I get a message of "Duplicate entry whatever for key numever" because these servers are already pretty similar. So with a little Google, I found the INSERT ... ON DUPLICATE KEY UPDATE syntax that should help me with the mysqldump I want to restore. Hopefully I can get myself out of the woods.

No comments:

Post a Comment