Game Development Community

Database Error

by Robert Sutton · in Torque Game Engine · 09/26/2009 (9:08 pm) · 4 replies

I embeded ODBC to connect to my mysql remotely. It sends echo back saying its eith er connected or error.

On my machine the ODBC can be found and connection is established ( this is off a webserver so dont give me local fixes or whatever. cause it is through the web ) But my 2 of my team members recieve this error when they load up their game...

*******************************************************************************
***** Initializing the database...
***** Using ODBC Driver: MySQL ODBC 3.51 Driver
***** software: 1
****** driver: MySQL ODBC 3.51 Driver connectionstring server=www.SECERT.com;port=3306;database=SECERT;user=SECERT;password=SECERT;option=3;
DatabaseConnection::Connect - SQL Error - state(IM002):errRow(1):native(0) - [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
DatabaseConnection::Connect - SQL Error - state(IM002):errRow(2):native(0)
***** Database error received while trying to connect to database.
***** End of database initialization.
*******************************************************************************


Im not understanding why my computer can find the database
but theirs cannot. Im recieving Database connectipn established.



#1
09/27/2009 (6:18 am)
It could be caused by any number of reasons:
1. They don't have the ODBC driver installed
2. They're using DSN connections that don't exist or are defined as a user DSN rather than System.
3. Could be they're 64bit trying to use 32bit connectivity.

I have to ask about your design though as it seems that you have clients connecting the database and this should NEVER EVER happen, because it would take about 5-10mins for an average hacker to find the username, password and address of your database and from there they can just connect to the database and do whatever they like!!!

Connections from a client should go to a server either the game server a seperate character server/database server written in anything from php, torque, python, etc that can validate the request and only provide access you define.
#2
09/27/2009 (9:40 am)
the connection is from server side ;)
#3
09/27/2009 (10:11 am)
also, is there anything MY TEAM needs such as the connector odbc / mysql on their own computer? I dont see why each computer would need it as it is on the DB mysql itself and we are not running it locally on a PC but yet a webhost. So I just cant think why im the only one who's torque.exe is the only one that can connect
#4
09/28/2009 (5:02 am)
Why do you connect to a MySQL-DB directly? For security reasons you should use php instead. This way you dont need a odbc-driver for database xyz.