Database error upgrading to 1.3

I get the following error while upgrading to Omeka 1.3:

Omeka encountered an error when upgrading your installation:

SQL error in migration: Mysqli statement execute error : ALTER command denied to user 'test_jdespai_use'@'localhost' for table 'omeka_users'

Please restore from your database backup and try again. If you continue to experience errors, you can notify us on the Omeka Forums.

It seems that the upgrade truncates the user account to 16 characters. It should be using the account "test_jdespai_user". I have verified that it is correct in db.ini as follows:

[database]
host     = "localhost"
username = "test_jdespai_user"
password = "xxxxxxxxxxxxxx"
name     = "test_jdespai_db"
prefix   = "omeka_"

Any thoughts?

The upper limit on MySQL username length is 16 characters.

As noted on the MySQL manual, this limit is imposed by MySQL and cannot be changed.

I'm not sure what's going on with your username here, but it shouldn't be possible to create a MySQL user with a 17-character-long name.

For what it's worth, I had the same database error with an upgrade from 1.2.1 to 1.3.1. To solve it I had to grant ALTER permissions to the omeka user.

Should I remove them now that the upgrade is complete?

Omeka's database users generally needs to have ALTER privileges to run upgrades, since these often alter Omeka's database tables.

You're right, it's very likely that this is the underlying problem from the first post. MySQL does truncate usernames to 16 characters, but it does this uniformly everywhere, it's just ignoring that last character.

Thanks scampbell. That is the resolution I came up with as well.