I have this error when I create a new theme, or when I import my own theme.
It's quite a big problem that happen to me on beta 2.
I am on an hoster : PLanetHoster.Are you on a shared server or do you manage it yourself?
If it's managed by your host, you need to ask them to do it.
Otherwise edit the my.cnf file.
It's failing before the first step. So I have to backup ? But the files on the FTP are still the same it will still ask me to upgrade.Which step did the upgrade fail at?
If it was template rebuilding then the database has already been upgraded, in which case the only way to revert is to restore backups of the database and server files.
Thanks so much for your help Mike, I have the forum in debug but when I remove a theme the error occur...The rough answer is that you have too many styles right now and removing one will be the simplest way to resolve it.
If you can't get into the admin CP, you can turn on debug mode in library/config.php:
$config['debug'] = true;
You should be able to temporarily get back into the admin CP to remove a style. (Note that styling may be broken.) You should then pick up with the upgrade if that's what you were doing. Be sure to remove debug mode afterwards.