NetXMS Support Forum

English Support => General Support => Topic started by: John M on July 07, 2013, 10:28:56 PM

Title: Setup problem - database connection
Post by: John M on July 07, 2013, 10:28:56 PM
I'm setting up NETXMS 1.2.7 on Windows 7 machine.  I can get through the install and I'm having trouble in the configuration part.  When I try to start Netxms Core I get the following: Unable to establish connection with database (Access denied for user 'netxms_usr'@'localhost' (using password: YES))

I have tried using ODBC connection.  I have tried installing MS SQL Server and using that as my DB engine.  I have tried using SQL Lite.  All give the same error, cannot connect to db.

I can connect other programs to my database server.  Firewall is off.  It is only Netxms I am having a problem with.

When I run netxmsd check I get 'NetXMS Core initialization failed'.

Below is my config file(username and password masked out). Any ideas?

LogFile = {syslog}
DBDriver = mysql.ddr
DBServer = localhost
DBName = netxms_db
DBLogin = ############
DBPassword = ##############
LogFailedSQLQueries = yes
Title: Re: Setup problem - database connection
Post by: Taomyn on July 08, 2013, 02:34:04 PM
What DB were you trying to connect to in the first place? That config file seems to be set up for MySQL so you need to be use the user-id has locahost access "%" or "localhost" to your MySQL server and the netxms_db database.
Title: Re: Setup problem - database connection
Post by: John M on July 08, 2013, 04:20:48 PM
MYSql was the one I originally tried.  The user has full access to the MYSql server.  I can connect via other tools....just not Netxms. 
Title: Re: Setup problem - database connection
Post by: Taomyn on July 08, 2013, 05:13:07 PM
Strange as that's more-or-less exactly the same settings I have:

LogFile = {syslog}
DBDriver = mysql.ddr
DBServer = localhost
DBName = netxms_db
DBLogin = netxms
DBPassword = **********
LogFailedSQLQueries = yes


Any errors in the MySQL .err file? You could also try logging into MySQL from the command-line:

mysql -h 127.0.0.1 -u netxms_usr -p

It will prompt you for the password.
Title: Re: Setup problem - database connection
Post by: John M on July 09, 2013, 04:43:48 PM
Not getting an error if I log into MySQL via command line with the exact same credentials.  Is there a way to log in MySQL to see what NetXMS is trying as credentials?
Title: Re: Setup problem - database connection
Post by: Taomyn on July 09, 2013, 04:52:30 PM
Quote from: John M on July 09, 2013, 04:43:48 PM
Not getting an error if I log into MySQL via command line with the exact same credentials.  Is there a way to log in MySQL to see what NetXMS is trying as credentials?

I'm no MySQL expert, but a quick look around shows there's a "--verbose" and "--debug" parameter for the mysqld service - perhaps one of those will enable better logging in the "{server name}.err" log file found in \MySQL\data
Title: Re: Setup problem - database connection
Post by: John M on July 11, 2013, 10:32:41 PM
Ok, it is basically telling me the password being passed by NetXMS is incorrect.  I can log in manually via command line using the username/password in the config file, but the NetXMS Core service fails.

Just for the heck of it, I tried re-installing on a SQL Server 2008 R2 database, and the exact same thing happens.

Ideas?  Is the password somehow getting jumbled in the process?  Did I miss a setting somewhere to use specific character set or something?
Title: Re: Setup problem - database connection
Post by: John M on July 11, 2013, 11:38:24 PM
This is puzzling to say the least.  I was able to get the NetXMS Core service to finally start using SQL Server...only if I switched it to use a Windows account, and I had to run nxdbmgr upgrade because I was getting a different error (something about format for one version, compile for another)

I would prefer to run this using MySQL, so I wish I could get this squared away...
Title: Re: Setup problem - database connection
Post by: Victor Kirhenshtein on July 12, 2013, 12:15:10 PM
Your problem is very strange indeed. When you install NetXMS, what installer you was using - full or minimal? If full, did you select to install DB client library?

Best regards,
Victor
Title: Re: Setup problem - database connection
Post by: John M on July 15, 2013, 06:01:40 PM
Yes, I installed the full installer and selected the DB client library each time.  I've probably gone through about 10-15 attempts at installing it.

For now, I'm going to use SQL Server and just use the Windows Authentication as I really need to get this up and running.