|
|
麻烦翻译一下,下面这段文章:xhan ! N* L: a/ G. f( C: `
' k! o7 y- {# g( i
- % i+ x- T! S2 L6 ?8 W4 a, g) S
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 e+ }/ `' N7 A9 e% w
3 L" P, E v% {/ g- ### What we need ###
! g) k) Y; S; ]* j9 W" K - Naturally, we will need a MySQL server to store the data for us, this document ) _* Q+ P8 s' [0 d
- will not explain how this can be done - there are documents out there for the
0 Z l; y- t) r/ |% p - interested. The requirements include a (empty) database for TeamSpeak to use3 x% M) n1 Z6 U, V. A. e% {
- and a user account (username + password) that has the permissions to do stuff# i1 P/ _$ W5 ?* b
- with the database. Additionally, you will need a vendor library installed on the
' c* o* I1 E8 q& ^9 _8 t" M - local machine, this came with my MySQL install.1 j3 N. T+ {8 T! m- H( J
- These instructions will not tell you how you might transfer your data from the/ w) j8 S8 {: Y, o
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. Q/ r$ C+ @) f - database.
( [, l7 h$ D% W ~4 T2 f9 R6 N - Some users have reported ways to import a SQLite database into MySQL, but at9 A3 z5 `& b- b8 }, H! N
- the time of writing, there are still too many issues - check the current status: ^8 L/ E9 e2 m% r w3 I
- in the TeamSpeak forums if you are interested.
# [1 p. Y5 Y4 ^+ H4 v; {: H - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% e7 l% K& M6 Y4 F: F8 r) ^: ]
- Borland was used. This driver can only interface with the client library that
. \% d3 p+ y; l6 ?/ s4 M - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' h U5 K6 F2 K9 M. | - client library - basically all you have to do is to use a 3.x client library as
' y4 T, z! T9 A! e: y E1 a - "VendorLib" and a 4.x database to connect to.% x, E/ z. U) S. k# U
- If you need more info about dbExpress, you can contact Borland.8 l6 N. t! w; Q- ?
- ( A. n6 S: H9 L) z9 M1 j
- ### Doing the work ###
/ R4 s6 d. L/ K1 G/ H4 D5 o% x2 @ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 @; Z+ f$ C$ Q3 ?! J2 q
- the perquisites right, just open your server.ini file, and add this section at3 [$ n/ d k" G8 K3 P3 N# X
- the end:
1 n" B4 E4 i( R; S - ---cut here---9 v+ U6 x3 V3 o% E
- [DBEXPRESS]' @) o* ?. A! Y) J7 p' Z" o' h, b K
- sqldir=mysql_sql& O( ? E: l$ a/ w" K
- Drivername=mysql* A' s) q: n6 g
- Database=Your_Database_Name_Here% L1 b$ v+ n6 ]+ V1 B6 Y p$ G
- Hostname=The_PC_the_MySQL-Server_is_on
: H) Z+ z' \# a5 c" @ - User_name=User_name_on_the_MySQL-Server
9 c8 v+ W0 |$ Q8 D/ @ - Password=Password_to_go_with_above_user_name
Y3 R+ c/ \& ~1 v' N+ e( Y+ C( p - GetDriverFunc=getSQLDriverMYSQL
. m! }2 v3 i( x5 Q+ ?& h$ y# P- w' ^ - VendorLib=path_pointing_at_your_mysql_vendor_lib
S+ Y' q( J5 \1 y5 E% O - LibraryName=path_to_libsqlmy_libary9 x7 |3 f i- P1 C; h2 S
- Active=1
^3 v# D* m" i- l - ---cut here---
0 s2 ` J6 \, H/ b2 u9 J( { - In my environment (a linux box with a MySQL server running locally) I have:) W1 R: _0 ^* _$ h+ j
- ---example---& t! s& n8 [0 L
- [DBEXPRESS]) I# b& I% k( C i
- sqldir=mysql_sql" E' R5 x; P p! p! E4 o! J
- Drivername=mysql# n$ S; M& H. G2 w- m
- Database=test
3 _+ Q( F* D( f( f0 P% L1 P - Hostname=localhost
$ w+ V: y3 _$ R0 ^ - User_name=testuser
9 s+ S- ~/ F* h) P" Y& ]& T% H - Password=my_password: f: `9 q, ]2 Z) R" S
- GetDriverFunc=getSQLDriverMYSQL( D! P- r) X" h2 J. |
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, `4 e: ~0 R+ a1 I7 z- D
- LibraryName=./libsqlmy.so) p# v2 d) c8 K" X+ W
- Active=1
4 X' q/ Q! V' G3 P3 D - ---example---
; u2 b6 ?) R0 ^0 K6 B
' ^5 ~* i' |2 |% g( m* j1 Q- On a windows box, also running the MySQL server locally, it would be:
+ C5 ~( Q" N2 V# |: p: H - ---example---
4 c' ~" F5 _$ y6 E* L - [DBEXPRESS] y3 P9 d& f& z% p
- sqldir=mysql_sql
) m3 y- X- f9 ` - Drivername=mysql) v5 O+ N* Z, _5 o
- Database=test4 W, l8 R4 n9 z. @# v7 y
- Hostname=127.0.0.1
6 a; i) |& }' h2 n9 V - User_name=testuser
7 Q2 x! X5 h) f+ O - Password=my_password+ q* S2 L8 C4 d7 \
- GetDriverFunc=getSQLDriverMYSQL
$ \# |- P/ {! |- a" E/ u - VendorLib=libmysql.dll, z* {* |. u \* M
- LibraryName=dbexpmysql.dll
. J2 c) `+ g/ X2 `. O: A$ y - Active=1
+ n# @- Z7 g1 j" [9 ^ - ---example----
# [ v' t8 k8 ?* Q: @9 v0 T - - written 02.03.04 by pwk.linuxfan8 b+ b5 E8 F# V2 m0 `" L
- 5 w8 |* G, @. d5 m
复制代码 |
|