4

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

MDMoore313
  • 5,581
  • 6
  • 36
  • 75
Eric
  • 41
  • 3
  • 2
    BGInfo, the *background* modifier? – MDMoore313 Apr 10 '14 at 01:50
  • [bginfo](http://technet.microsoft.com/en-au/sysinternals/bb897557.aspx) It's a software that create a snapshot of system info on desktop wallpaper. – Eric Apr 10 '14 at 02:02
  • Yeah, there's an easier way to do this, would you like to know how? – MDMoore313 Apr 10 '14 at 02:03
  • Please :D. I want to know whether it is possible. if it is not then I'll have to look for alternatives. – Eric Apr 10 '14 at 02:05
  • Okay, first thing's first: Delete this question, then ask another *after* doing a bit of googling on the matter. For more information on asking a good question, see [here](http://serverfault.com/help/how-to-ask) – MDMoore313 Apr 10 '14 at 02:13
  • I don't know if it's possible, I highly doubt it. If it is possible, I *certainly* wouldn't want to attempt it. – MDMoore313 Apr 10 '14 at 02:14
  • Please do tell me what I have done wrong in this case. We would like to use this application in the office to display system info so we can view everything in a glance. I have researched and searched this site for possible answers and I found nothing. Googling gave me relevant articles from 7 years back. The software is updated 8 months ago so I guess it is still recent. Am I off topic, or this question is too vague, or something else. I am not trying to justify but since I am new here I'll learn. Thanks – Eric Apr 10 '14 at 02:39
  • @Eric - if you want to collect system information, there are better ways of doing it. Querying the systems via WMI is probably a much better way, as it does not involve installing and relying on a third party: http://blogs.msdn.com/b/oldnewthing/archive/2004/10/21/245652.aspx – Mark Henderson Apr 10 '14 at 02:57
  • @MarkHenderson - Thank you for the reply. We wanted to display the info on the desktop so that we can view at a glance when we go to the work station. That was the main reason behind using the third party. This application does that plus it can save to database, probably not MySQL(I am doubtful myself now, even though their help file has the example of it). I will research more on WMI. Although if MySQL connection can work then it is perfect for us. – Eric Apr 10 '14 at 04:39

1 Answers1

4

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

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
  • Hi, thanks for the answer. That is what I thought too. I tried the conn. string in that link and it still throw the same error. I tried both MySQL ODBC 3.51 and the latest MySQL ODBC 5.3 drivers but still no luck. Mark suggested WMI so I'll research on that. I am very curious now because it is clearly listed in their documentation. I will play around some more. If I do work out something I'll post it here. Thanks! – Eric Apr 10 '14 at 04:54