|
|
麻烦翻译一下,下面这段文章:xhan
5 [8 e; H J1 A ]) j' p& `1 c3 ]4 t9 `, _
-
) K0 N, k" V/ ?& l - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######' ~6 P# C- A/ N0 n* A) D. V |
- ! c3 ]' n( A% o6 D
- ### What we need ###
# c( _, E' n6 Q9 y' l( B: X8 ` - Naturally, we will need a MySQL server to store the data for us, this document * U$ |! m9 y* j! v' Z7 {; R, R/ u
- will not explain how this can be done - there are documents out there for the 1 `+ @$ O- l Z$ c5 f! a j
- interested. The requirements include a (empty) database for TeamSpeak to use
; H5 }" }( _2 z - and a user account (username + password) that has the permissions to do stuff; H1 B( f! T* m6 p
- with the database. Additionally, you will need a vendor library installed on the
6 ?9 F1 I6 D2 {2 ?" @. [1 K5 l# `1 ? - local machine, this came with my MySQL install.! N e0 @) f; t! \" ?
- These instructions will not tell you how you might transfer your data from the9 }5 _4 o, c! r7 v) s5 J
- SQLite database to the MySQL database, we start with a clean and empty MySQL3 Z! m( \6 v: f K$ f
- database.; I* v6 _9 g' y% i' D
- Some users have reported ways to import a SQLite database into MySQL, but at
4 F" x$ O* r* P - the time of writing, there are still too many issues - check the current status8 i; C( H. r" B& T3 h
- in the TeamSpeak forums if you are interested.- i5 v% i' w$ D: n+ o0 i% N2 I/ C
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 X& Q h4 p9 _' c4 @& M1 j" v - Borland was used. This driver can only interface with the client library that ! E* ] Z, Z. \1 w0 c
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this P6 A0 L! k. M0 E
- client library - basically all you have to do is to use a 3.x client library as # I8 s4 e' g7 x* F
- "VendorLib" and a 4.x database to connect to." L c# `- S& I5 u
- If you need more info about dbExpress, you can contact Borland.
* j6 S" s1 H9 e& q
! Z3 M8 ?3 a7 Z7 A: G( ?/ }# Z5 [- ### Doing the work ###
: J' l0 d- I0 [: C - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all1 r* h3 x6 a( U) Q3 T& x4 d# ^
- the perquisites right, just open your server.ini file, and add this section at
! U5 L5 M* y% E" \ - the end:
) h1 l) A# j/ k+ F5 G+ ?# ?/ `, ^$ D% E) x - ---cut here---
/ E& W% ?, e2 j- S: ?4 C - [DBEXPRESS]* k9 E9 R+ v9 v( ]3 p
- sqldir=mysql_sql( O W. O4 H! j% Z
- Drivername=mysql
' d9 n2 A# p/ s! h8 [$ d - Database=Your_Database_Name_Here
& c A: j$ B9 B1 g - Hostname=The_PC_the_MySQL-Server_is_on
& H4 Z4 u6 v' `1 T1 d/ W/ c/ i R - User_name=User_name_on_the_MySQL-Server4 O [+ Y' K/ V8 u0 `: k5 Q
- Password=Password_to_go_with_above_user_name8 k4 z/ T/ l2 h" j- K; B6 U7 ]
- GetDriverFunc=getSQLDriverMYSQL
+ V: S4 b6 g$ D) o4 t4 w4 E1 G% h - VendorLib=path_pointing_at_your_mysql_vendor_lib
6 R9 ?5 \+ L) G1 U: {" y - LibraryName=path_to_libsqlmy_libary
7 V6 ]9 ~" P$ i0 A - Active=1
: A f4 A2 s! _6 \ - ---cut here---9 v) m8 [/ s' u4 v: Q. {
- In my environment (a linux box with a MySQL server running locally) I have:
6 ^8 {6 s$ Q6 h3 |- A* v/ d - ---example---
& R- R7 I9 h0 f5 a0 K: D: x; t - [DBEXPRESS]! Q5 x" e1 H( ]9 ]' h% K8 a" u
- sqldir=mysql_sql( x; l7 A" g3 i% C; d @" K
- Drivername=mysql( k: f9 {0 |: d, w7 w) z" h: D/ a
- Database=test
0 p+ X" J0 p4 b( A ^ - Hostname=localhost5 W7 ?5 a' v' _
- User_name=testuser
2 T) X1 R" G* H% f - Password=my_password
2 s! r' _" L5 h: ` - GetDriverFunc=getSQLDriverMYSQL
+ _: d2 n& k' B3 m1 _( t - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ C) i( R' t* o. p - LibraryName=./libsqlmy.so
N' V$ X! g% L8 ~ - Active=1
+ E: E: ?% {+ O, n - ---example---
8 `# l. K# l+ \ - J0 F& U2 ^4 p! \
- On a windows box, also running the MySQL server locally, it would be:6 {2 A/ s h" P5 q
- ---example---
" s. b4 j) S" u3 V8 {3 b, J - [DBEXPRESS]
5 S' g. g. B$ k0 R0 z - sqldir=mysql_sql+ j6 H" y; u4 x+ m! Y1 q0 h
- Drivername=mysql
7 U, P. Y, F7 y7 } - Database=test
) j" D2 \( k1 O0 H ^ - Hostname=127.0.0.1
/ G9 Q- j5 \9 m0 P7 E n; o - User_name=testuser" J. R- P9 M9 _7 I
- Password=my_password
# a0 k$ c* T1 a* _ - GetDriverFunc=getSQLDriverMYSQL6 F# S+ O) {3 W
- VendorLib=libmysql.dll8 n3 m" ]9 D$ _ K( }( s5 N$ n# Z
- LibraryName=dbexpmysql.dll
: U7 E1 N' X0 D7 X. L( V4 s" w - Active=1
6 y) m$ s) s+ M* @2 O4 M/ O - ---example----
4 s7 x0 F8 Z' ^" f! M - - written 02.03.04 by pwk.linuxfan: S' \9 Z: N5 ^' y/ `4 P0 p
7 i/ U8 V" ?* \# p# g& b
复制代码 |
|