|
|
麻烦翻译一下,下面这段文章:xhan
* ~ g. E- r4 C5 h$ ^) \. z" q. m4 ` { Y" ~4 r5 H, c% P1 c8 V
-
# L' E* `. r+ d& g - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" P, s. H! H! r8 {+ C/ I* s, U - - k+ S0 x, R; ?; `2 w
- ### What we need ###
s0 v7 |& y- K2 g7 r% n$ k2 W - Naturally, we will need a MySQL server to store the data for us, this document
! a$ @0 E& }* U - will not explain how this can be done - there are documents out there for the " R' M$ ?' q/ ?7 ^9 C
- interested. The requirements include a (empty) database for TeamSpeak to use7 e$ j, A. Y. Y9 l
- and a user account (username + password) that has the permissions to do stuff
' p- p% |7 B0 Y! M - with the database. Additionally, you will need a vendor library installed on the) a; \, K7 U, G
- local machine, this came with my MySQL install.) p& U2 Z8 ^$ S) |/ l7 ]
- These instructions will not tell you how you might transfer your data from the
2 @- | B0 y2 Z \' N1 w - SQLite database to the MySQL database, we start with a clean and empty MySQL7 E& E7 h- a( d. m& S; C
- database.5 R( b) h: h- z; C, X7 [4 e
- Some users have reported ways to import a SQLite database into MySQL, but at
9 y: j: }, r# l) d6 s - the time of writing, there are still too many issues - check the current status6 T7 s/ u% |! ^) X& R, u
- in the TeamSpeak forums if you are interested.$ f' D; ?9 E* b; _# I
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from' k7 N( O% i2 Q
- Borland was used. This driver can only interface with the client library that
, o% w2 q7 H, ]0 o& P# ~8 p Z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
, f. \% j! Z$ R8 g- T' G( v$ p( u) _ - client library - basically all you have to do is to use a 3.x client library as 2 B) w' [3 [+ d0 \ \. K
- "VendorLib" and a 4.x database to connect to.) f( a3 Y% w8 r+ u2 ?
- If you need more info about dbExpress, you can contact Borland.4 }2 {2 P1 F$ {2 q4 V% |
0 v9 r, B+ g" W" m" j- ### Doing the work ###
$ t* H4 ], c, ~ j$ F7 K - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all) J+ @& M& j; ^( a* F# a- k/ B! G
- the perquisites right, just open your server.ini file, and add this section at
% `2 B; a! h s4 N- n4 M2 l - the end:
( w7 Z5 i6 j" }2 `2 z+ o0 K' \ - ---cut here---% [% [* i/ J f( }; d7 q+ X; l
- [DBEXPRESS]) |9 ^, N* q* V+ z
- sqldir=mysql_sql! [+ X9 }1 L) Z+ f5 H& o
- Drivername=mysql+ d2 A" w5 j5 ~2 V+ Y7 v
- Database=Your_Database_Name_Here
% O, j2 K% o6 t5 ^. e - Hostname=The_PC_the_MySQL-Server_is_on; z/ n# r& `; v! v
- User_name=User_name_on_the_MySQL-Server
+ a* Y0 [. q/ [1 f" u9 N! C6 i, p - Password=Password_to_go_with_above_user_name5 o" [$ u+ j, D5 j- P# B6 I
- GetDriverFunc=getSQLDriverMYSQL$ |! Z+ i/ t8 |( `1 P* u
- VendorLib=path_pointing_at_your_mysql_vendor_lib2 L1 a/ x. O, f1 X5 l3 {
- LibraryName=path_to_libsqlmy_libary
7 x% o1 X) C0 Y: l! E - Active=1- K# [- B" K6 g6 H) ^5 J8 Y; f
- ---cut here---. I! L5 j s/ i0 z
- In my environment (a linux box with a MySQL server running locally) I have:
$ W+ q" H; P0 u" k* h0 _3 C - ---example---" s& R( J, q; G; Y+ A) k
- [DBEXPRESS]
( V& R0 p+ Y% R3 ^ - sqldir=mysql_sql. y0 N* {5 N2 D1 m9 w
- Drivername=mysql
u+ A1 ]5 N4 {6 E: @: C3 d: _! b - Database=test/ Q G+ ?$ U: K; X" W7 I3 ?! q
- Hostname=localhost; x) ]0 A5 ?8 b0 O N+ K+ y! O. h
- User_name=testuser) |# V9 i3 q2 c% m
- Password=my_password
|' ]$ D' ]- ~ B/ M- P - GetDriverFunc=getSQLDriverMYSQL, d! p1 e. m% |# G1 N
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" t& s* a- x+ O) f: F
- LibraryName=./libsqlmy.so
& G7 x1 \; l2 y9 W: x) I - Active=1! m* `* k0 E& H/ [! ^8 S
- ---example---
% S/ ~0 J4 T$ J+ M1 B - ! g: y _ A5 g5 x0 @$ w1 o7 a
- On a windows box, also running the MySQL server locally, it would be:
) k, c- B# [) X0 V3 v- W8 i - ---example---
3 \. X% ~4 l. _+ g3 w" D - [DBEXPRESS]. r5 d% Z: P0 ^1 P
- sqldir=mysql_sql1 W4 m, p7 ~3 p9 M
- Drivername=mysql
7 b+ ~' M( y3 q- g4 e4 H5 \. i - Database=test
( r. h- ?' f; y - Hostname=127.0.0.10 D4 X: \7 g3 c+ Z8 @* N
- User_name=testuser ?! c. |+ x/ F! a: L4 d7 k$ }
- Password=my_password
2 I: u+ a/ E8 s" e6 n3 \ - GetDriverFunc=getSQLDriverMYSQL7 ?2 J1 n: Y" I: d
- VendorLib=libmysql.dll
) U/ A- m8 w' D - LibraryName=dbexpmysql.dll3 _* m$ x) |5 n3 g' _) U P
- Active=1
% G' t) `- W9 J* R( n& ^ - ---example----
! w7 ^- E- z2 a' W: a - - written 02.03.04 by pwk.linuxfan
: I0 f! D1 p( G$ K( \6 W: X$ S
1 x; t: }# o- q( H2 Y
复制代码 |
|