Windows – BGINFO with MySQL for storing computer information

connectionMySQLwindows

We are trying to set up BGinfo to record network computers' information in a centralized database. We intend to set up BGinfo to start up for all users and record logon and logoff time plus setting up a scheduler that update the database on an interval. We are trying to use MySQL database as the database but I haven't been able to connect to it successfully. I am using localhost as a testbed. I installed MYSQL ODBC 5.3 Driver from MySQL page. This is the connection string that I used.

Driver={MySQL ODBC 5.3 UNICODE Driver};Server=localhost;Database=myDataBase;
User=myUsername;Password=myPassword;Option=3;

I set up MySQL ODBC source on User DSN too. The documentation is pretty vague and I can't really find any articles that have successfully used MySQL DB. Trying to connect give me

Connection failed:
SQLState:'01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Open
Connection failed:
SQLState: '08001'
SQL Server error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL server does not exists or access denied

The error message is pretty clear but I have not idea how to fix it.

Any help will be very much appreciated.

Eric

Best Answer

Yikes! I had no idea BGInfo could do this.

Here's a report of success using MySQL. It looks pretty straightforward-- plain vanilla ODBC. You don't have to create any DSNs based on what I'm seeing-- the connection string is just in the BGI file.

Your error message really makes it look like BGInfo is trying to use an SQL Server driver rather than the MySQL driver. If you haven't, double-check your .BGI file to see that it has the right connection string. I verified that, though really ugly, opening the file in Notepad will let you see the connection string to double-check it.

Bear in mind that anyone you give the BGI file to has a logon to your MySQL instance. You'll want to create a user with constrained permissions to use for this purpose (althouhg, apparently, there is some capability in MySQL to do SSPI authentication like SQL Server and just automatically use the logged-on user's credentials-- don't know about that-- I don't use MySQL anywhere).