Manually Reset MySQL Password

Revision as of 08:59, 13 November 2022 by Rnoti (talk | contribs) (→‎Problem)

MySQL password reset manually


   KB 24485        Last updated on 2022-11-13  




0.00
(0 votes)

Problem

MySQL, database connection failure due to invalid credentials. User Zimbra not able to authenticate database connection.

Error:
Log file:/opt/zimbra/log/mailbox.log
WARN  [main] [] misc - Could not establish a connection to the database.  Retrying in 5 seconds.
com.zimbra.common.service.ServiceException: system failure: getting database connection
.
.
Caused by: java.sql.SQLInvalidAuthorizationSpecException: Access denied for user 'zimbra'@'localhost' (using password: YES)

Solution

Reset MySQL password by manually updating MySQL configuration file.

Step 1:

  • Stop the mysql service. [Run as Zimbra] [su - zimbra]
$ mysql.server stop

Step 2:

  • Modify the /opt/zimbra/bin/mysql.server to start the MySQL with skipping the grant tables (Skipping authentication). [Run as ROOT]

From

--ledir=/opt/zimbra/common/sbin < /dev/null > /dev/null 2>&1 &

To

--ledir=/opt/zimbra/common/sbin < /dev/null > /dev/null 2>&1 & --skip-grant-tables &
Jump to: navigation, search