|
|
麻烦翻译一下,下面这段文章:xhan
) t; ]8 U* s, D( D5 h* J
6 t+ A4 D% v$ i* V9 t" E-
$ w% `( |1 \, H! \2 [1 z6 D' T - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% O8 o# J: _" T7 ?5 o: L/ a
2 [* w1 M# D8 {* I& O- ### What we need ###6 ?7 V% B9 d( O4 N/ U( X7 e
- Naturally, we will need a MySQL server to store the data for us, this document
* t3 V5 b- t6 m2 Y9 s# V# A - will not explain how this can be done - there are documents out there for the $ A. F2 C. y2 g( Q
- interested. The requirements include a (empty) database for TeamSpeak to use& s9 p4 ?4 { @1 w5 d3 A
- and a user account (username + password) that has the permissions to do stuff
2 s! B2 G6 H) Y7 n! q i5 J. q0 D - with the database. Additionally, you will need a vendor library installed on the
( }2 O* W' ?4 b! ]8 A- ? - local machine, this came with my MySQL install.! p( Y) K7 X1 I9 n# g x
- These instructions will not tell you how you might transfer your data from the
! c' r0 ?5 Q/ ?* m* w - SQLite database to the MySQL database, we start with a clean and empty MySQL; ]0 b! u, L0 D8 S, f# ?5 O
- database.
# Z, P3 U: L) o' U0 o - Some users have reported ways to import a SQLite database into MySQL, but at/ {% _8 h! ^! d1 K" }
- the time of writing, there are still too many issues - check the current status
5 ?" C+ \' U( M+ B2 i1 W% \ - in the TeamSpeak forums if you are interested.
, |3 y2 H, p; f, t - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ `; N' j+ c3 \* Q( u$ z3 ~ H" q
- Borland was used. This driver can only interface with the client library that
! R' M% e4 |; E- ^ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 i( b0 O' |" L; r$ Y: |5 L7 I - client library - basically all you have to do is to use a 3.x client library as
4 U! n, ^! w& D8 P& L% I - "VendorLib" and a 4.x database to connect to." l9 t' a, p, \3 x3 r V0 H" W
- If you need more info about dbExpress, you can contact Borland.
% L: c' B- u/ N- I) N! `% s1 i/ p
- q9 N6 h8 z( t5 W/ G* \- ### Doing the work ###
1 A2 [. }+ l; @8 e5 U - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 _9 M+ x8 f4 N3 I
- the perquisites right, just open your server.ini file, and add this section at
) _- \: @9 e& i- \: a, c: _" ^/ o) `8 P - the end:5 O: o/ v7 y5 w/ W
- ---cut here---
. V" f& y$ K" T% Z' u4 k9 K - [DBEXPRESS]
* |8 R! D5 P" E7 k - sqldir=mysql_sql* R1 d# W8 f f f" T6 q" o" a
- Drivername=mysql
0 }, L, b4 N! [. ~) l2 T q - Database=Your_Database_Name_Here- y) b/ R9 \4 {( J& ~2 C5 {) m
- Hostname=The_PC_the_MySQL-Server_is_on
9 s. [7 x; Z( Z' T - User_name=User_name_on_the_MySQL-Server8 O3 \1 ?4 J( z5 p' o: R
- Password=Password_to_go_with_above_user_name
: I! m9 n6 _& M5 f+ Q - GetDriverFunc=getSQLDriverMYSQL
2 M$ p9 g6 Z s) R - VendorLib=path_pointing_at_your_mysql_vendor_lib
3 `# h$ r/ s% u. r) | - LibraryName=path_to_libsqlmy_libary
& ?- K6 N, [, @/ I7 m; A; f - Active=1
; g( t1 F0 b3 c: m2 V/ o - ---cut here---1 [1 o5 I1 b- N; Z8 i8 z6 m
- In my environment (a linux box with a MySQL server running locally) I have:
3 {& B/ Z4 D* X- a, R9 j - ---example---6 G4 @" M% q/ k8 B* m' `
- [DBEXPRESS]( l ]0 P0 h; X' P! W# q+ C
- sqldir=mysql_sql |; V S) J$ K; @9 K+ N0 Y2 D
- Drivername=mysql
( l# ]* P, l E% O# f - Database=test4 d5 P* W% j& \" @5 _# I
- Hostname=localhost
7 p6 Q+ t4 O. G# k, T0 V6 c8 p) L - User_name=testuser: [4 Z; e! @: P
- Password=my_password$ D- N- H: F2 g+ o2 k
- GetDriverFunc=getSQLDriverMYSQL* D% Z7 X5 {$ w8 `
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; Y; |/ }% r: e - LibraryName=./libsqlmy.so; m9 Q0 B# O- R8 J) f! W5 g
- Active=1
$ G* R( z7 e% I w( c U6 F: j% ? - ---example---
! C- s9 g+ h5 g
! t* I) A- f& I* k% c- On a windows box, also running the MySQL server locally, it would be:: W1 e8 N0 V1 e9 d& Y+ [9 F
- ---example---
9 f7 C1 f! k6 Y" w# ` - [DBEXPRESS]# O/ {# j# m) Q( r7 T4 F
- sqldir=mysql_sql3 O! g$ G. z4 M# F6 H. o4 _
- Drivername=mysql# F% O! s1 A- G. J+ e! T5 V6 N
- Database=test
* r8 |3 F7 M, y* q' o - Hostname=127.0.0.1
! v _: H0 K" I7 E2 c9 | - User_name=testuser
% \! d$ K& V& B h- p - Password=my_password5 P3 I, S5 Y. \ @2 `
- GetDriverFunc=getSQLDriverMYSQL: H' y ~. \. Z3 m) G5 @
- VendorLib=libmysql.dll. L7 Z# A. `: A0 c6 @( `
- LibraryName=dbexpmysql.dll( e( [# f; X4 E: x" V
- Active=15 ?/ w2 T( M; {
- ---example----2 B' ]/ f9 B, T, K4 E' f
- - written 02.03.04 by pwk.linuxfan7 F; _- b8 {8 ^
9 Y/ v# l) d) X) _
复制代码 |
|