Try setting the passwords using this method, see:
Issues with mysql and logmysql passwords - Zimbra :: Wiki
Use the mysql password that you've set in the localconfig
zmlocalconfig -s | grep pass | grep mysql
After setting the password, attempt to access mysql and logmysql.
mysql
logmysql