NetXMS Support Forum

English Support => General Support => Topic started by: karanik on September 26, 2016, 02:35:06 PM

Title: Fix netxms core service on windows won't start or Unable to establish connection
Post by: karanik on September 26, 2016, 02:35:06 PM
Hello,
I just realized that on a new installation of Windows2008 Standard R2 with MySQL 5.7 if the password contains the character "#" i am taking the error "Unable to connect to database"
I don't know if that is a bug or not.

C:\NetXMS\bin>nxdbmgr check
NetXMS Database Manager Version 2.0.6 Build 8073 (2.0.6-RELEASE) (UNICODE)

Unable to connect to database netxms_db@localhost as netxms: Access denied for
ser 'netxms'@'localhost' (using password: YES)

C:\NetXMS\bin>nxdbmgr check
NetXMS Database Manager Version 2.0.6 Build 8073 (2.0.6-RELEASE) (UNICODE)

Checking database (excluding collected data):
* Checking zone objects...                                            [PASSED]
* Checking node objects...                                            [PASSED]
* Checking interface objects...                                       [PASSED]
* Checking network service objects...                                 [PASSED]
* Checking cluster objects...                                         [PASSED]
* Checking template to node mapping...                                [PASSED]
* Checking object properties...                                       [PASSED]
* Checking event processing policy...                                 [PASSED]
* Checking network map links...                                       [PASSED]
* Checking data tables...                                             [PASSED]
Database doesn't contain any errors
Database check completed
Title: Re: Fix netxms core service on windows won't start or Unable to establish connection
Post by: tomaskir on September 26, 2016, 02:46:59 PM
Try to enclose the DB password in "".

Does that work?
Title: Re: Fix netxms core service on windows won't start or Unable to establish connection
Post by: karanik on September 26, 2016, 02:54:48 PM
Quote from: tomaskir on September 26, 2016, 02:46:59 PM
Try to enclose the DB password in "".

Does that work?

Same.
I test it and from C:\NetXMS\etc\netxmsd.conf

No problem for me. I remove the # and all is ok.

I post that just to inform you.
Title: Re: Fix netxms core service on windows won't start or Unable to establish connection
Post by: networkwise on September 10, 2017, 02:54:01 AM
I had the same issue and it worked for me so no special characters
Title: Re: Fix netxms core service on windows won't start or Unable to establish connection
Post by: cbwecomm on March 04, 2021, 10:19:15 AM
This is apparently still a bug/issue.   The # character cannot be used in the password for the db user (works fine from MySQL Command Line Client). 
Title: Re: Fix netxms core service on windows won't start or Unable to establish connection
Post by: Victor Kirhenshtein on March 04, 2021, 10:34:54 PM
You can encode such password with nxencpasswd tool. For example:


nxencpasswd dbuser dbpass#123


will produce string


MKGI20iIOABe/NdxPN/ZMjCyW8ng20jLMLJbyeDbSMs=


which you can use as value for DBPassword parameter.

Best regards,
Victor