PDA

View Full Version : Windows TS2 Server to Remote MySQL Server?


xCav8r
21-01-2005, 06:09
After figuring out that TS2 doesn't work with MySQL 4.1 (http://forum.goteamspeak.com/showthread.php?t=19619), I was able to establish a connection from my Windows TS2 Server to MySQL 4.0.23, both running on the same machine. I have not, however, successfully connected a TS2 server on a remote machine to the MySQL running on my server. Has anyone successfully done this?

Here's the server.ini file of the Windows TS2 Server running on the same machine where MySQL resides. This works without any problems.

[DBEXPRESS]
sqldir=C:/Program Files/Teamspeak2_RC2/mysql_sql/
Drivername=mysql
Database=teamspeak
Hostname=localhost
User_name=db_user (edited for post)
Password=db_pass (edited for post)
GetDriverFunc=getSQLDriverMYSQL
VendorLib=libmySQL.dll
LibraryName=dbexpmysql.dll
Active=1
And here's the one from the remote TS2 Server. This has yet to establish a connection.

[DBEXPRESS]sqldir=C:/Program Files/Teamspeak2_RC2/mysql_sql/
Drivername=mysql
Database=teamspeak
Hostname=192.168.2.100
User_name=db_user (edited for post)
Password=db_pass (edited for post)
GetDriverFunc=getSQLDriverMYSQL
VendorLib=libmySQL.dll
LibraryName=dbexpmysql.dll
Active=1

As you can see, the only difference between the two is the hostname. In addition to the I.P address of my server, I've tried it with the hostname as well, which resolves with no problems in all TCP/IP applications. For example, I can connect to the MySQL server from this PC using MySQL Administrator. Further, there is no firewall to complicate things, since it sits on the other side of my router. Both this PC and the Server are on my LAN, and yes, the I.P address of the server is correct.

The user I created for TS2 has ample access to the db, since it works without problems from the TS2 Server that resides on the same machine as the MySQL server. The host of the user is "%", but I've also tried doing it with the name of this PC and alternatively with the I.P. address of this PC. I can access the MySQL server from this PC using that user with MySQL Administrator with no problems, but I can't get it to work with TS2 Server.

Last but not least, here's the log file for the server on this PC. It's the same message every time.

20-01-05 17:52:47,ALL,Info,server, Server init initialized
20-01-05 17:52:47,ALL,Info,server, Server version: 2.0.20.1 Win32
20-01-05 17:52:47,ERROR,All,SQL, Database initialization error: EDatabaseError.dbExpress Error: Invalid Username/Password
20-01-05 17:52:47,ERROR,All,SERVER, Start_Server: unable to open database
20-01-05 17:52:47,ERROR,All,GENERAL, critical error, shutdown initiated
Anyone have any suggestions? Can this even be done?

SHRIKEE
13-02-2005, 15:47
try this:

[DBEXPRESS]
sqldir=d:/Teamspeak2_RC2/mysql_sql/
Drivername=mysql
Database=teamspeak
Hostname=192.168.0.1
User_name=ts2_name
Password=ts2_pass
GetDriverFunc=getSQLDriverMYSQL
VendorLib=libmySQL.dll
LibraryName=dbexpmysql.dll
Active=1


this works for me, the ts2 server is at 192.168.0.2 and the mysql at 192.168.0.1

also enter the mysql_lite map in the ts2 server map and copy all files to the mysql_sql map for proper functionality

to make it work with mysql 4 you need the libmysql.dll of mysql 3.23 in the ts2 folder

caribehost
14-02-2005, 03:32
Isn't this kind of asking for trouble? What happens when the MySQL server goes down (maintance, failure, etc). What we do is have two machines mirroring the same data, so if one TS server dies, the DNS is routed to the backup TS server (much slower machine but atleast the outage is only minimal).

xCav8r
19-02-2005, 06:17
this works for me, the ts2 server is at 192.168.0.2 and the mysql at 192.168.0.1

also enter the mysql_lite map in the ts2 server map and copy all files to the mysql_sql map for proper functionality

to make it work with mysql 4 you need the libmysql.dll of mysql 3.23 in the ts2 folder

Shrikee, thanks for the input. I should have been clearer in my initial post about the things I had done, though I did cite them in another thread related to this subject (http://forum.goteamspeak.com/showthread.php?t=19619). I did the things you suggested, but it turned out to be my ODBC driver that was causing problems. I had problems with 3.51.10 that were apparently fixed in 3.51.11, since after installing it today I was able to connect to a remote MySQL db both on my LAN and from outside my network.

BTW, I don't think TS2 will work with 4.1. When I reverted to 4.0.23, it worked. Has anyone gotten it to work with 4.1?

Isn't this kind of asking for trouble? What happens when the MySQL server goes down (maintance, failure, etc). What we do is have two machines mirroring the same data, so if one TS server dies, the DNS is routed to the backup TS server (much slower machine but atleast the outage is only minimal).

You make a good point, and it's not something that I haven't considered. I should be honest: I was trying this simply to see if it could be done, but I was also thinking in the back of my mind about clustering MySQL servers--something I've never seriously looked into. But, assuming (and hoping) that it can be done, it seems like a nice way to deliver server consistency + high availability.

SHRIKEE
19-02-2005, 15:57
im running mysql 4.1.21


[edit]

whoops that will be 4.0.21, sorry ;)