Setup problem - database connection

Started by John M, July 07, 2013, 10:28:56 PM

Previous topic - Next topic

John M

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

Taomyn

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.

John M

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. 

Taomyn

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.

John M

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?

Taomyn

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

John M

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?

John M

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...

Victor Kirhenshtein

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

John M

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.