2
Last time i saw this, it was due to MySQL user misconfigurations: make sure that the MySQL user using the database has access/write to the database tmp folders. Also, can you login thru user.php and then go to admin via admin.php, and turn on MySQL debug in system admin -> preferences -> general settings and see what could be causing this?
Herko