I've made a copy of opt/zimbra and installed the new version after stopping all services. I received the following ERROR:

Setting defaults...Setting defaults from existing config...Done
Upgrading from 3.0.1_GA_160 to 3.1.0_GA_328
Fri Apr 14 12:19:16 2006: Stopping zimbra services
Fri Apr 14 12:19:18 2006: Checking mysql status
Fri Apr 14 12:19:18 2006: Starting mysql
Fri Apr 14 12:19:18 2006: SELECT value FROM config WHERE name = 'db.version'
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/db/mysql.sock' (2)
Error while running
Daniel Bülow (12:35 PM) :
'/opt/zimbra/bin/mysql --user=zimbra --password=pRI1.tH4_GJH6kycTtxVPvqq1D --database=zimbra --batch --skip-column-names'. at /opt/zimbra/libexec/scripts/Migrate.pm line 134.