Connecting to MySQL on Seperate Windows server
Posted: 21 Sep 2010, 02:50
Hello everyone
Just wanted to drop a line as this is a bit of an odd ball.
I have a SFS server and a separate hosting server with the database.
Need to connect to the database then do a typical secure login. The issue is that the database is a MySQL on a Windows server using MySQL ODBC DSN more specifically the MySQL ODBC 3.51 Driver. I can not move the database to a linux due to the project.
So looking at this link below:
http://www.smartfoxserver.com/docs/inde ... ection.htm
The sample information stated from the link is:
<DatabaseManager active="true">
<Driver>org.gjt.mm.mysql.Driver</Driver> <ConnectionString>jdbc:mysql://192.168.0.15:3306/sfsTest</ConnectionString> <UserName>myUserName</UserName>
<Password>myPassword</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM contacts]]></TestSQL> <MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
I think the sample above is missing the port in this description. Not sure why it is not added but anyway.
But the first issue is the "org.gjt.mm.mysql.Driver" does not exist in the windows box. So not sure what the equivalent of: "MySQL ODBC 3.51 Driver" is. Also because it uses a DSN not sure how to access the database.
Has anyone done this successfully?
Thank you in advance.
Just wanted to drop a line as this is a bit of an odd ball.
I have a SFS server and a separate hosting server with the database.
Need to connect to the database then do a typical secure login. The issue is that the database is a MySQL on a Windows server using MySQL ODBC DSN more specifically the MySQL ODBC 3.51 Driver. I can not move the database to a linux due to the project.
So looking at this link below:
http://www.smartfoxserver.com/docs/inde ... ection.htm
The sample information stated from the link is:
<DatabaseManager active="true">
<Driver>org.gjt.mm.mysql.Driver</Driver> <ConnectionString>jdbc:mysql://192.168.0.15:3306/sfsTest</ConnectionString> <UserName>myUserName</UserName>
<Password>myPassword</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM contacts]]></TestSQL> <MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
I think the sample above is missing the port in this description. Not sure why it is not added but anyway.
But the first issue is the "org.gjt.mm.mysql.Driver" does not exist in the windows box. So not sure what the equivalent of: "MySQL ODBC 3.51 Driver" is. Also because it uses a DSN not sure how to access the database.
Has anyone done this successfully?
Thank you in advance.