Powered by Blogger.

How to Display MySQL root Password in Zimbra


In the situation we need to utilize the zimbra MySQL database server in order to host other databases, we may need to know what is the root password for MySQL. The following command will help you to find and display MySQL root password. These command has been tested on Zimbra 8.0.7 thas was running on CentOS 6.5 operating system.
To view system operating system :
[root@mail-server ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
To view zimbra version :
[root@mail-server ~]# su - zimbra
[zimbra@mail-server ~]$ zmcontrol -v
Release 8.0.7_GA_6021.RHEL6_64_20140408123911 RHEL6_64 FOSS edition.
To view MySQL root password :
[root@mail-server ~]# su - zimbra
[zimbra@mail-server ~]$ zmlocalconfig -s | grep mysql_root_password
antispam_mysql_root_password =
mysql_root_password = ipXlRAJ7654321FDXHb4nMUFr9Uf
To display zimbra MySQL pasword :
[root@mail-server ~]# su - zimbra
[zimbra@mail-server ~]$ zmlocalconfig -s | grep mysql | grep password
antispam_mysql_password =
antispam_mysql_root_password =
mysql_root_password = ipXlRAJ7654321FDXHb4nMUFr9Uf
zimbra_mysql_password = c7dr5Tj7654321qcHCP6qJMVRVw
To view more options and help :
[root@mail-server ~]# su - zimbra
[zimbra@mail-server ~]$ zmlocalconfig --help
usage: zmlocalconfig [options] [args]
where [options] are:
 -c,--config    File in which configuration is stored.
 -d,--default        Show default values for keys listed in [args].
 -e,--edit           Edit configuration file, changing keys and values
                     specified. [args] is in key=value form.
 -f,--force          Allow editing of keys whose change is known to be
                     potentially dangerous.
 -h,--help           Show this usage information.
 -i,--info           Show documentation for keys listed in [args].
 -l,--reload         Send a SOAP request to the server to reload its local
                     config.
 -m,--format    Show values in one of these formats: plain (default),
                     xml, shell, export, nokey.
 -n,--changed        Show values for only those keys listed in [args] that
                     have been changed from their defaults.
 -p,--path           Show which configuration file will be used.
 -q,--quiet          Suppress logging.
 -r,--random         Used with the edit option, sets specified key to
                     random password string
 -s,--show           Force display of password strings.
 -u,--unset          Remove a configuration key.  If this is a key with
                     compiled in defaults, set its value to the empty
                     string.
 -x,--expand         Expand values.
    Blogger Comment
    Facebook Comment