Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
Connection to Zimbra database fails with error: ERROR 1044: Access denied for user (2007313)
Symptoms
- You cannot connect to the Zimbra mysql or logmysql database.
- Database kogin fails.
- You see one of these errors:
#logmysql
ERROR 1044: Access denied for user 'zimbra'@'localhost' to database 'zimbra_logger'
#mysql
ERROR 1044: Access denied for user 'zimbra'@'localhost' to database 'zimbra'
Cause
This error occurs when the password stored in the database does not match the password being used to connect.
Resolution
To resolve this issue, you must reset the database password.
If you are using ZCS 7.x, run this command:
/opt/zimbra/libexec/zmresetmysqlpassword
If you are using ZCS 6.x, or if that command does not successfully reset your password, reset your password manually:
- Ensure that you are operating as the zimbra user, by running this command:
su - zimbra
- Stop the mysql service, by running this command:
mysql.server stop
- Switch to the root user, by running this command:
su - root
- Modify
/opt/zimbra/bin/mysql.serverso that mysql skips the grant tables when it starts:
- Run this command:
vi /opt/zimbra/bin/mysql.server
- Modify these lines from
--defaults-file=${mysql_mycnf} \
--external-locking \
--ledir=${mysql_directory}/libexec < /dev/null > /dev/null 2>&1 &
to--defaults-file=${mysql_mycnf} \
--external-locking \
--ledir=${mysql_directory}/libexec < /dev/null > /dev/null 2>&1 --skip-grant-tables & - Save and exit the file.
- Run this command:
- Switch to the zimbra user, by running this command:
su - zimbra
- Start the mysql service, by running this command:
mysql.server start - Connect to the database, by running this command:
mysql
- Change the password, by running this command:
mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='user'
whereuseris eitherrootorzimbra, as needed.
Note: Make sure that the password you specify is the same as the password used in localconfig. To check the localconfig passwords, run these commands:zmlocalconfig -s | grep mysql_root_password
zmlocalconfig -s | grep zimbra_mysql_password - Flush the privileges and exit, by running these commands:
mysql> FLUSH PRIVILEGES;
mysql> exit - Switch to the root user, by running this command:
su - root
- Reverse the changes made to
/opt/zimbra/bin/mysql.server:
- Open
/opt/zimbra/bin/mysql.serverfor editing. - Locate and remove this text:
--skip-grant-tables
- Save and exit the file.
- Open
- Switch to the zimbra user, by running this command:
su - zimbra
- Stop and start the mysql service, by running these commands:
mysql.server stop
mysql.server start
You can now connect to the mysql database.
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.
Actions
KB:
- Updated:
- Categories:
- Languages:
- Product Family:
- Product(s):
- Product Version(s):

