|
|
麻烦翻译一下,下面这段文章:xhan
( J5 i D+ `3 S. v" P$ M, [; G4 e5 Y+ w9 r0 j( ^
-
1 L# Q6 C1 W0 K/ r2 Q* [ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 a3 z2 M7 ^2 I! G1 [. m7 w! j- a
; Z, Q8 Z( i1 R$ G; H- ### What we need ###/ S4 e2 L: q8 w. i, e
- Naturally, we will need a MySQL server to store the data for us, this document
3 C- C' z8 T# o6 t! V; B) A - will not explain how this can be done - there are documents out there for the # I& ]- a" k+ P4 D( x
- interested. The requirements include a (empty) database for TeamSpeak to use
9 g0 O/ S7 e) Y% J. ^( T* c - and a user account (username + password) that has the permissions to do stuff% _% q! q+ h" Y3 k1 v: t4 I
- with the database. Additionally, you will need a vendor library installed on the0 O+ @! \6 R+ @3 t" B, M. A% [+ q2 K
- local machine, this came with my MySQL install.
' o7 n3 E1 v; o* @, @. N0 T' F - These instructions will not tell you how you might transfer your data from the0 X( _5 r& l* c1 H6 v3 q
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 a- v8 p- z8 W! }6 ~2 D - database.0 H' S$ B' o( U4 k; v( f/ n
- Some users have reported ways to import a SQLite database into MySQL, but at* p" w; R7 K- S- I! R
- the time of writing, there are still too many issues - check the current status% Q( H! K* q. C% r; E/ H
- in the TeamSpeak forums if you are interested.0 r; w/ Z' L5 @- s) b# |; Y8 Z
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from- [8 l7 K% ~, G, k: H. L
- Borland was used. This driver can only interface with the client library that $ y0 s1 j w# C. C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, o0 Q* _ ?- U( Y W/ m
- client library - basically all you have to do is to use a 3.x client library as
% T9 R" \5 R u# E6 x+ b - "VendorLib" and a 4.x database to connect to.4 w: Y1 f. T* z
- If you need more info about dbExpress, you can contact Borland.9 @( |, D5 X8 j) N* e8 e' R
- ! T8 j* _5 [9 X/ p) i
- ### Doing the work ###
9 a, z' a+ R. r* r2 W$ k. T4 _ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all0 g3 ~7 O2 y; t$ e" H$ \: k l1 I
- the perquisites right, just open your server.ini file, and add this section at+ T& K6 N6 w9 ^. m
- the end:8 O+ @. u/ T3 Y& h" h
- ---cut here---
/ i/ W* z5 q3 M2 \ - [DBEXPRESS]
3 @6 h9 n; H6 c9 \% G* G" e* D - sqldir=mysql_sql
3 y! M. g1 g( _: r! m" Y - Drivername=mysql
8 n) V, s* L" T# t - Database=Your_Database_Name_Here
7 _$ c1 O& w- a* D - Hostname=The_PC_the_MySQL-Server_is_on
# K: ^4 \1 H8 T, j- ~" \ - User_name=User_name_on_the_MySQL-Server* {( p% T4 H0 w0 _. R& j" p
- Password=Password_to_go_with_above_user_name
6 @ ?4 k' F8 W* [+ [2 o/ \ - GetDriverFunc=getSQLDriverMYSQL
' o2 M) g% n' a p, V/ O, P - VendorLib=path_pointing_at_your_mysql_vendor_lib% o" s+ i' f. x% c) ?) B
- LibraryName=path_to_libsqlmy_libary+ B8 u, l, J3 p, w7 e% h
- Active=1
) U# V* s5 S" S, d# @9 W/ C - ---cut here---
2 p9 q3 B2 d7 i3 U% G - In my environment (a linux box with a MySQL server running locally) I have:8 x$ B; `1 n3 X- f( _( E
- ---example---. V5 q* \* `6 _# C, x* Y. G
- [DBEXPRESS]
' d' B9 p0 f h& D& g& m6 U - sqldir=mysql_sql
* i; y3 ]! \& m+ j! V5 l5 x2 B - Drivername=mysql5 { K& v: p* M: R
- Database=test
! u1 y& _) J, o) Z$ N( |4 M5 ~ - Hostname=localhost5 _3 `+ ?/ c) w9 m: R9 b+ [6 t& ^
- User_name=testuser' x/ B0 w# C8 m/ ]+ @
- Password=my_password
$ P' @; A: t- ^$ |& A6 B - GetDriverFunc=getSQLDriverMYSQL- E9 t. A6 B! s7 s! \3 S
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 F! `" S3 j6 \: {: W9 q8 P - LibraryName=./libsqlmy.so
7 u- w/ {9 W: c9 n2 X$ d - Active=1' P; _ x @ t$ ^" a# F! T
- ---example---1 N4 ]* }8 l$ ~, R* l1 y) ^
- 1 p- c/ Q1 j( e. ?( V
- On a windows box, also running the MySQL server locally, it would be:% N1 c3 }( }9 i' X
- ---example---
" a$ M: x4 v' j - [DBEXPRESS]
7 ?9 ~0 p" k3 }* ~- F; E - sqldir=mysql_sql
, V) t. Q4 q% Q& N$ z( u4 ~* \ - Drivername=mysql
# w+ m9 w0 s, \" h( ?6 Z - Database=test
/ I% i" [, S6 I6 W - Hostname=127.0.0.1
3 f$ l1 w+ l& w9 w - User_name=testuser! N3 g$ U( n8 @# X/ I; K
- Password=my_password3 m* M7 D/ G( C! e5 _8 z, g$ _/ i
- GetDriverFunc=getSQLDriverMYSQL1 a( V1 k, m U" ]
- VendorLib=libmysql.dll* C" {; R5 t8 m% e) J
- LibraryName=dbexpmysql.dll0 Z1 r/ H2 }* s% m" `
- Active=13 {- ]) p; ~4 D) T1 ]* K, r
- ---example----' d9 I) _5 c$ v2 @. J( ~6 m: i
- - written 02.03.04 by pwk.linuxfan( Q3 T. Z. X4 j: J) k7 _' D
$ m/ f! F$ f7 f4 B \6 p3 y
复制代码 |
|