|
|
麻烦翻译一下,下面这段文章:xhan 2 }. g% W. a7 X c
" ?5 m" h8 M; m# S7 ?& G- * ?4 M! t; b; l5 `
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( @* g( m- f9 p! J k+ `
- 3 c3 g. h! ^7 ]
- ### What we need ###) Q- \2 E3 ~) R* P7 V0 _4 d
- Naturally, we will need a MySQL server to store the data for us, this document
& @( r/ [$ \4 Y7 N - will not explain how this can be done - there are documents out there for the
* C: W) r- R2 J5 _; K6 w8 E - interested. The requirements include a (empty) database for TeamSpeak to use
7 Z3 Z& L6 {- V' C0 S% X$ X% `) `. Y - and a user account (username + password) that has the permissions to do stuff' M) q. _& V3 f) z: K
- with the database. Additionally, you will need a vendor library installed on the b% f7 s" r3 L1 H1 K1 p
- local machine, this came with my MySQL install.
) @, Q5 a' r& s, M! z/ M5 T; S - These instructions will not tell you how you might transfer your data from the. F. g3 u1 v! C7 t+ u2 S
- SQLite database to the MySQL database, we start with a clean and empty MySQL
: ]" k) O( T! J3 V# L - database.& |% P* e" b. b
- Some users have reported ways to import a SQLite database into MySQL, but at& b% W& G5 Q, [. F: d) T+ T4 A& }
- the time of writing, there are still too many issues - check the current status9 e1 y2 _0 k" |3 t K
- in the TeamSpeak forums if you are interested.
# C: p( Z+ A, H' ~& l' D' B8 ` - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( S& g% I w# w, q4 g6 Y - Borland was used. This driver can only interface with the client library that
/ L3 D0 X$ c1 R5 R# n+ F' d2 e" f6 E- V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
) ~& X4 y) ]3 @' g - client library - basically all you have to do is to use a 3.x client library as
! X" u7 Q5 }1 t; S - "VendorLib" and a 4.x database to connect to.5 r2 b( U5 p7 C6 r, |. e) G
- If you need more info about dbExpress, you can contact Borland., s$ A7 C' r% T8 G' |3 a, Z8 t
- : e! O, n- }+ x, \
- ### Doing the work ###4 K* [/ v$ k* z. Q3 n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, T! u3 j; m4 Y$ V. U - the perquisites right, just open your server.ini file, and add this section at
; c3 O! o: P d) o+ e7 G' j, g - the end:
/ N) {2 |: G9 J - ---cut here---
4 v4 Q( {% o/ D) ?% O& o& n5 a% Z - [DBEXPRESS]5 z9 X* u8 G" @: T1 }# q
- sqldir=mysql_sql
- t- }( y" j& N/ x& A; m - Drivername=mysql
- Z, Q6 o# r6 Y/ n - Database=Your_Database_Name_Here! W" g K1 t* Q6 i5 o
- Hostname=The_PC_the_MySQL-Server_is_on
0 @: S0 @; j' [* A$ g - User_name=User_name_on_the_MySQL-Server
; r* `' N0 T4 r( a8 G' P: y - Password=Password_to_go_with_above_user_name
1 S0 Z* N, l. V5 W3 Y$ \# N' ~ - GetDriverFunc=getSQLDriverMYSQL
4 X+ g0 O0 C( Z3 J9 z5 N - VendorLib=path_pointing_at_your_mysql_vendor_lib
7 D) E" j" w! y, w/ t5 T: k - LibraryName=path_to_libsqlmy_libary" `" x2 ^2 b' B6 c* L
- Active=1
: j( n+ R, E3 h/ }9 Y - ---cut here---1 Y& \# w/ P5 D9 P
- In my environment (a linux box with a MySQL server running locally) I have:
& n: j( v0 L' Z4 T1 b$ D - ---example---
/ L' n. T: w* n5 d - [DBEXPRESS]
; d1 {' ^2 @0 ?) q# w$ u - sqldir=mysql_sql
& x% s' z. U* } - Drivername=mysql
+ y* \2 g. D, B: O/ y - Database=test1 B# I' [3 C9 b) I
- Hostname=localhost' w* P3 z7 R4 v: T
- User_name=testuser
, D# C8 }: ]( ] m' q4 C - Password=my_password
2 u3 F# _( D7 @. c6 Y$ R4 V - GetDriverFunc=getSQLDriverMYSQL+ t5 ?3 x5 q3 j, P2 I
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
8 H+ K5 n. {. H! D* p' H5 h3 L& e - LibraryName=./libsqlmy.so- W' e) D; Z: U% @( B
- Active=15 m3 d3 T* M) i6 D9 @1 g6 r; d9 S% S
- ---example---
: O: F) ~ z2 S$ S% S9 }
6 p y' ~; G( l- On a windows box, also running the MySQL server locally, it would be:, I) J9 T3 w8 ~/ P+ ^; |; X
- ---example---2 z5 ]5 b% K* A% f' {8 ^9 q" N
- [DBEXPRESS]' f! E- h) s" z" L* B3 Q: w7 y
- sqldir=mysql_sql1 j; O S. F+ w+ r: C, ?! d# z; a9 q2 I
- Drivername=mysql9 F8 _) a% n8 M1 T( e
- Database=test
. }( K. I: q% ]2 `3 p9 _( j' g# Z - Hostname=127.0.0.1
: C2 c! S* l" ^ b5 |' ~% J1 Z. i - User_name=testuser
& T3 m0 `4 Y0 F7 W/ u' Z8 l" h# Y - Password=my_password
+ i- I& ^# [: m, k - GetDriverFunc=getSQLDriverMYSQL
+ x- P$ q$ {7 S$ d% [% h, c+ I - VendorLib=libmysql.dll. s% Y$ b6 A7 H# ]& Q& e% ~
- LibraryName=dbexpmysql.dll! N+ X0 t$ b/ o x
- Active=1
5 h$ K" v- N% t$ x* ? - ---example----1 l4 q2 Z% d$ _2 \
- - written 02.03.04 by pwk.linuxfan9 I9 O- V/ d" F/ M" m/ E' U
- " n/ O6 z$ G' C/ F2 x: |& Z
复制代码 |
|