|
|
麻烦翻译一下,下面这段文章:xhan ! B: [* s3 U: n2 G3 x
+ M+ @. s* D" x7 V/ }/ D4 @: _3 v
-
% D+ `. Y! ?7 F9 P - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######" B4 j% ^8 \: P: D- c6 _- @0 x6 v
, ~( K' b: @, J6 A2 |' h- ### What we need ###( i9 _" |+ x+ ~: o: n; O2 _
- Naturally, we will need a MySQL server to store the data for us, this document 3 t" R' y9 H/ [3 w
- will not explain how this can be done - there are documents out there for the 9 D- ]/ _4 g4 ~+ J
- interested. The requirements include a (empty) database for TeamSpeak to use
1 D2 A7 a7 p* A4 R3 W - and a user account (username + password) that has the permissions to do stuff3 A2 H( k, \+ G0 _" V$ p
- with the database. Additionally, you will need a vendor library installed on the' O/ F% _: | k5 o% B0 O7 C
- local machine, this came with my MySQL install.% s; h% T9 H4 k8 T4 p
- These instructions will not tell you how you might transfer your data from the
9 Y: M8 S6 o$ s7 ^6 q5 ?, E1 f - SQLite database to the MySQL database, we start with a clean and empty MySQL! ?! _# W3 E8 c
- database.
! l& S/ y0 n# Z2 x - Some users have reported ways to import a SQLite database into MySQL, but at: a }1 x. A ~2 x" |
- the time of writing, there are still too many issues - check the current status+ y1 ]% p( m: u0 }5 D2 m9 a" M: \
- in the TeamSpeak forums if you are interested.( n( R% I* P& N: S9 |, A$ ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% o1 d D K! A4 w
- Borland was used. This driver can only interface with the client library that / x# X8 V1 g% H, p I% _; U2 R
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 E( V' Y2 x% a' d: l& }
- client library - basically all you have to do is to use a 3.x client library as
! Y/ `9 J; n6 K# Z4 `; U - "VendorLib" and a 4.x database to connect to.7 k7 D, y& f% U7 O8 s: x
- If you need more info about dbExpress, you can contact Borland.
( f3 [8 N" L8 w5 A: a - 8 \ G6 J8 i! |
- ### Doing the work ###. K9 C. i, ^" B+ Q& e, ~; `
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' h5 y8 V1 t9 L2 m: y - the perquisites right, just open your server.ini file, and add this section at
1 x2 H1 }6 J/ E8 j( G - the end:
7 I+ I2 [9 s0 H1 \0 b4 c3 U) v - ---cut here---( n. @0 P# }$ `! ]+ m% ^' @0 [
- [DBEXPRESS]
d0 Z; `' D; i% a) J5 y - sqldir=mysql_sql7 n. d/ g! l6 f' v" c p
- Drivername=mysql
- R. R" f) N" p) g$ q' D - Database=Your_Database_Name_Here
. C7 M0 W! D& {' m - Hostname=The_PC_the_MySQL-Server_is_on
$ i% Z& `! H3 ?5 T) \$ `# ~. x - User_name=User_name_on_the_MySQL-Server' f. T' q6 m p$ }: Z7 d
- Password=Password_to_go_with_above_user_name
- ~" J% z! K" Y - GetDriverFunc=getSQLDriverMYSQL) k5 x! l* L' A4 s
- VendorLib=path_pointing_at_your_mysql_vendor_lib; Q; Q/ R7 D3 ?* a$ S
- LibraryName=path_to_libsqlmy_libary D) N# q2 x- u4 ?5 K1 T5 l9 W' p) F
- Active=1
' R: W1 x: R( P* b - ---cut here---) p8 g7 M$ u, K
- In my environment (a linux box with a MySQL server running locally) I have:: s# [" S z5 U5 d' e( q
- ---example---
- ]) E% a; E' W" v6 I; j - [DBEXPRESS]
. K) K& {: _6 o) K - sqldir=mysql_sql6 d5 z2 R# R* n7 y7 w7 w
- Drivername=mysql2 H2 h" i9 R( s2 r. D
- Database=test2 \7 d- U! s7 A7 Q; c! C
- Hostname=localhost
& P" D5 V& E% q" a - User_name=testuser
: ^: A, Q0 {5 k5 v5 G f; O - Password=my_password) e4 z% D: Y- w: I: k* o- z
- GetDriverFunc=getSQLDriverMYSQL
- C! z) \# }5 q3 q! o6 `: I) R - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% C3 h( I1 }' U1 h) C
- LibraryName=./libsqlmy.so5 o: J" f+ m* n5 b& g4 L
- Active=14 K/ K! V/ B5 p' c$ Q3 |' }5 A! Z
- ---example---
( m3 l6 A5 y2 W - / p6 N) u% B9 [7 F: i9 j$ i6 a3 F; ^
- On a windows box, also running the MySQL server locally, it would be: b' J( l4 @8 ^% K+ I
- ---example---
3 K, g! e/ J' g5 a& ` - [DBEXPRESS]
@6 \$ ?7 Y# I5 ` K - sqldir=mysql_sql
, O6 M+ x; c! B, R% Y; n - Drivername=mysql
3 R5 E1 t6 p, ?. v+ @ - Database=test% O, F& I+ j8 Y; h
- Hostname=127.0.0.1
5 n% i* f8 `( }) }$ L7 r% ]1 p% u - User_name=testuser( [2 `: D8 P$ B6 y. ?* z
- Password=my_password
/ i" f* y, X- G3 i ]/ P- ~ - GetDriverFunc=getSQLDriverMYSQL
u, J2 o4 u( m" P. T8 o' s8 o5 B - VendorLib=libmysql.dll5 B! r$ c `( {7 ^2 E \
- LibraryName=dbexpmysql.dll
3 l. D! R6 ]! }: ]- L* v - Active=1
$ C9 A% p$ Q% u" C6 ]8 l! p: z2 @ - ---example----
% f# D' @% N G+ G% z - - written 02.03.04 by pwk.linuxfan
1 \' o8 h4 V* O - + O% Z& e3 E1 u( t! m( s
复制代码 |
|