|
|
麻烦翻译一下,下面这段文章:xhan
3 D0 v$ X8 [' c0 v" {* r. |% y- f. |
- + ?: r' w$ M: K9 ` |
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 p; t# z0 J$ z8 S+ b% p$ Q
- 8 S \/ Y ^) t# u3 I* `
- ### What we need ###. @0 q8 V& t% x. L- w; U
- Naturally, we will need a MySQL server to store the data for us, this document
* {5 E- r2 ~( L4 s6 Q- @" A4 `; ~ - will not explain how this can be done - there are documents out there for the + P e4 d+ z% S( t
- interested. The requirements include a (empty) database for TeamSpeak to use
% ~; Q' h' e3 n* O# z - and a user account (username + password) that has the permissions to do stuff
( l& |1 }; @7 t4 [( v* H - with the database. Additionally, you will need a vendor library installed on the
) g+ `3 G+ F* _ - local machine, this came with my MySQL install.
: b5 z# o) c8 h3 h6 C - These instructions will not tell you how you might transfer your data from the( O) b. `9 w% S$ w3 S
- SQLite database to the MySQL database, we start with a clean and empty MySQL2 y% c1 ^' v+ u. l' J7 V
- database.& d8 X/ o* U3 w r0 c
- Some users have reported ways to import a SQLite database into MySQL, but at/ o7 X2 U) ~: [; H' x" ]4 p
- the time of writing, there are still too many issues - check the current status+ ~1 x; n7 u& q& O3 j
- in the TeamSpeak forums if you are interested.$ W2 B, @+ W' P2 i- U) i# D
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from5 p' |4 p2 _3 v+ P
- Borland was used. This driver can only interface with the client library that
, i1 }, [0 E* h6 X% o3 Z0 L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this. D7 g1 s% _( f0 V" @' a
- client library - basically all you have to do is to use a 3.x client library as
: D! M$ s9 T0 [/ `& U X - "VendorLib" and a 4.x database to connect to.
8 T4 q3 P. J ~7 {: P, T - If you need more info about dbExpress, you can contact Borland.( \- S. ?4 Z7 @ A }; j
- - X! u7 t" g5 Y% p
- ### Doing the work ###, M! d6 e. x6 }2 k, I
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 d. M& [4 L* C# p5 D" [, k
- the perquisites right, just open your server.ini file, and add this section at
; l0 h+ a+ |" a5 V% k9 q - the end:# _1 I* {) Y& N: o' F
- ---cut here---
2 ?9 I$ x- Q; ] - [DBEXPRESS]
) q( U5 D, T: b - sqldir=mysql_sql
9 a$ f8 A. V: r. p - Drivername=mysql
! b0 K5 F; t% i7 K1 P7 T3 Z - Database=Your_Database_Name_Here. o9 O/ o5 {. I: P9 S' T; T
- Hostname=The_PC_the_MySQL-Server_is_on
# T- ^ @' D {4 ^8 u9 [ - User_name=User_name_on_the_MySQL-Server
1 ^: S8 E) f, p* [4 j& j - Password=Password_to_go_with_above_user_name6 i/ D- p2 d5 d7 M2 A
- GetDriverFunc=getSQLDriverMYSQL
3 c( j; r6 w- D: @ - VendorLib=path_pointing_at_your_mysql_vendor_lib. k! l- ^0 b. y+ a" O& ~3 ?
- LibraryName=path_to_libsqlmy_libary
/ H/ P4 [+ A; G! K% Z7 j - Active=11 R4 f; R+ P) x& \. I. ~: B
- ---cut here---" \2 j7 n, B9 d k+ N( i
- In my environment (a linux box with a MySQL server running locally) I have:2 d A I9 h5 E% ` _. a% z/ @% G
- ---example---
2 _! D1 W0 z! Q! J9 w; e3 [ - [DBEXPRESS]
( |% l8 F. x) D - sqldir=mysql_sql+ ? V& i, J5 F# m+ d, E% t2 p& g
- Drivername=mysql
1 Y! m9 ^1 `* R8 ~. |6 f - Database=test( L! T- i1 \. \3 c6 K
- Hostname=localhost) m9 j3 d6 F2 r* v6 i
- User_name=testuser* N+ I8 N) S4 q0 Z/ n: a8 q
- Password=my_password
/ P3 B8 z. H6 p - GetDriverFunc=getSQLDriverMYSQL+ d, T \- q1 x4 \7 D
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- G5 m+ d. G6 w+ _% l0 i - LibraryName=./libsqlmy.so( K7 J0 @" o0 L( w* w4 d
- Active=15 A; w2 m3 l q7 l W
- ---example---( ]' q2 [. K" ~$ |: Z
- & k1 Y' J! R9 }9 s
- On a windows box, also running the MySQL server locally, it would be:
; J7 N- v/ ?# A, d, m - ---example--- ?; X5 x6 O, `. e
- [DBEXPRESS]
6 `. `' y8 l3 p1 c; X - sqldir=mysql_sql/ d/ K$ x8 z+ t
- Drivername=mysql4 d3 a" ]8 [) \) H" x
- Database=test
6 o. K5 E$ s! R9 _ - Hostname=127.0.0.1% ?' \( A5 R' Y4 `+ k
- User_name=testuser0 r7 g( q, O) Z3 ~6 f
- Password=my_password
' |# C/ z" a! d - GetDriverFunc=getSQLDriverMYSQL7 i/ s& l; n7 \; C+ C( y$ c
- VendorLib=libmysql.dll
3 x& @7 N/ } h- |# L! U - LibraryName=dbexpmysql.dll: R N" v/ u4 q
- Active=1* c% Q: g1 s3 ?5 p
- ---example----7 C9 l7 R6 Y) q" F& ]6 Z5 ^9 I
- - written 02.03.04 by pwk.linuxfan# v/ o; s+ C0 j. o) u* Z1 Y
3 q" \6 j u6 }& k: N) B
复制代码 |
|