Problem With MySQL Connection On New windows Install (Access denied in nxdbmgr)

Started by briandonn, January 10, 2018, 09:03:04 PM

Previous topic - Next topic

briandonn

Hello,

I have setup netxms-2.2.2 on MS server 2008 R2 with MySQL. The DB config in the installer worked as expected but after the installer the core service would not start. Results for nxdbmgr check show "Unable to connect to database netxms3@localhost as netxms: Access denied for user 'netxms'@'localhost' (using password: YES)". I issued in MySQL command line "GRANT ALL PRIVILEGES ON netxms3.* TO 'netxms'@'localhost';" (same as suggestion here https://www.netxms.org/forum/configuration/not-able-to-connect-database/). I flushed the perms and recycled MySQL but still getting the same error for nxdbmgr check "Unable to connect to database netxms3@localhost as netxms: Access denied for user 'netxms'@'localhost' (using password: YES)". Would you have any suggestions on other steps to try?

Output from show grants:
mysql> show grants for 'netxms'@'localhost';
+-------------------------------------------------------------+
| Grants for netxms@localhost                                 |
+-------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'netxms'@'localhost'         |
| GRANT ALL PRIVILEGES ON `netxms2`.* TO 'netxms'@'localhost' |
| GRANT ALL PRIVILEGES ON `netxms3`.* TO 'netxms'@'localhost' |
| GRANT ALL PRIVILEGES ON `mysql`.* TO 'netxms'@'localhost'   |
| GRANT ALL PRIVILEGES ON `sys`.* TO 'netxms'@'localhost'     |
| GRANT ALL PRIVILEGES ON `netxms`.* TO 'netxms'@'localhost'  |
+-------------------------------------------------------------+

Thanks!
Brian

tomaskir

"localhost" might be getting resolved differently by nxdbmgr and MySQL.
(for example, one resolves an IPv4 and one an IPv6 address)

Try using "127.0.0.1" just to be sure.

briandonn

Hey,

Thanks for the suggestion, still have the same issue with the IP. I setup a fresh instance of the latest NetXMS and MySQL in a different environment and OS (win 8.1 vs server 2008 R2) and getting the same results.

I tried pointing a different client and connecting with the same creds to the MySQL instance/DB and they seem to work from localhost except when I connect with NetXMS. Going to try older versions of NetXMS and possibly MySQL to see if I get different results.

Thanks!
Brian

briandonn

Wasn't able to get MySQL to work in my instance and moved to MS SQL Express. Had an issue with that saying known SA creds were invalid when trying to create the DB but found this thread https://www.netxms.org/forum/installation/unable-to-connect-to-database/ and Toepfe steps worked perfectly and am up and running.

Thanks!