|
|
麻烦翻译一下,下面这段文章:xhan 1 t* A. \3 g1 L9 H. H
; c! T& M, G+ h$ B) s- . m6 P* `2 h! S. f2 d! ^' P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 h W& \* P+ w8 q' N8 V
- 3 F! I: A" v8 S& c, x) U* e) X B
- ### What we need ###
7 v( W% Y1 ?9 K! D @$ b3 i5 m( Z - Naturally, we will need a MySQL server to store the data for us, this document / C# ^$ L9 \" B1 A8 Y" l
- will not explain how this can be done - there are documents out there for the
! n( i K$ }: ?5 }! z2 z5 u9 U) d - interested. The requirements include a (empty) database for TeamSpeak to use
* G8 Y% E$ o/ I9 p. u" j/ }# A+ s2 x7 ]8 ^5 T - and a user account (username + password) that has the permissions to do stuff: U* o3 V9 F7 A, ^1 X9 E
- with the database. Additionally, you will need a vendor library installed on the
* |! Z3 H+ |7 q9 m. {) s4 Q - local machine, this came with my MySQL install.
" A" m9 t" f0 J6 _% a* x% B* h) L - These instructions will not tell you how you might transfer your data from the6 t1 L) \; B7 ] @1 y) f
- SQLite database to the MySQL database, we start with a clean and empty MySQL( _/ e# @$ J; g% E, w7 ~5 {
- database.
v9 q8 H- g5 _2 U1 {) X {1 a - Some users have reported ways to import a SQLite database into MySQL, but at
/ t* N) T) C: X, W4 L3 ~* b - the time of writing, there are still too many issues - check the current status
H" M) v2 h1 u( |" R q - in the TeamSpeak forums if you are interested.9 R8 b& C( ]* E% p3 ?: M
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, Y/ b, }& L# k7 l7 o g( c - Borland was used. This driver can only interface with the client library that
2 C; {! |1 w4 A) V' ^$ p& f - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 j7 H; J2 |2 b; c4 [0 H6 _
- client library - basically all you have to do is to use a 3.x client library as ! {, A0 r2 C" g) S% f
- "VendorLib" and a 4.x database to connect to.
* w) J2 s+ Z3 b. V3 z2 n2 }( s1 W - If you need more info about dbExpress, you can contact Borland.& C7 M. M3 K0 k9 V" B4 _* ]* T8 p
1 ]- O* \9 N. O1 g; S) o7 @2 d/ }- ### Doing the work ###
6 G |' g' w/ l E3 g; ` - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* G( @- E9 S; [: L7 D* ~
- the perquisites right, just open your server.ini file, and add this section at
5 s; F7 [" X* g8 g# Y7 M6 p" l3 ^ - the end:
: h* M0 {$ U* i1 k! G, w* G& _ - ---cut here---# h3 Y! Y, A) V8 w
- [DBEXPRESS]; b3 d# b' R0 G; C
- sqldir=mysql_sql6 N9 b3 k) \2 _1 O" s8 E
- Drivername=mysql' g* d6 V2 y! ~- P* c
- Database=Your_Database_Name_Here
5 j! b7 k6 V& ?4 `" {5 n - Hostname=The_PC_the_MySQL-Server_is_on
& Y" p: c4 g7 F - User_name=User_name_on_the_MySQL-Server
% F/ n; Z3 X0 v& L - Password=Password_to_go_with_above_user_name
; C' f; z8 @7 z1 @& L$ I( `1 q - GetDriverFunc=getSQLDriverMYSQL! Z1 d! u! |2 z0 y8 T. O
- VendorLib=path_pointing_at_your_mysql_vendor_lib( c! [) X1 R3 d7 ^9 T
- LibraryName=path_to_libsqlmy_libary! Z# l: F7 D9 y( j% H/ x* [
- Active=1
3 Y+ Z/ o$ E4 K, F( k; g5 B - ---cut here---2 H r% g+ }! ^2 z
- In my environment (a linux box with a MySQL server running locally) I have:5 N( r7 d( `" Z
- ---example---
}# N: y& Y F5 G) ] - [DBEXPRESS]: ^( c6 z& _9 R! T& V U; f
- sqldir=mysql_sql3 D. x3 R! D1 b0 P- @
- Drivername=mysql% |; p1 F t# J4 v
- Database=test- `: g& ]( g- }$ q4 A) \
- Hostname=localhost: n* ?& g8 ^" o2 l v
- User_name=testuser
: n1 T: R+ V0 _, d+ M9 z5 }/ |5 V. T - Password=my_password6 s5 h/ }; }7 U' `9 N
- GetDriverFunc=getSQLDriverMYSQL' z2 p/ d+ F3 q1 [
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0# _6 A, U. o* h+ ^ c
- LibraryName=./libsqlmy.so
1 a- @/ f/ z* { - Active=1
; q c$ Y* V5 f6 L. S - ---example---
B! j) j8 ^. ?6 ?/ h/ ^
: u: B, j& R. {- On a windows box, also running the MySQL server locally, it would be:
: P* z- n" k! b - ---example---7 z" X) W4 ^9 F
- [DBEXPRESS]' |6 W+ w0 C. b' l1 P7 N
- sqldir=mysql_sql
& S& b* A7 u4 z - Drivername=mysql3 v# P0 Z5 H1 g: |
- Database=test- _; ^! i! `, z
- Hostname=127.0.0.1* x0 s8 `& w& K s
- User_name=testuser$ O% n# p% L: S8 k1 D U# i
- Password=my_password
+ n( ~/ N& k* c) Z - GetDriverFunc=getSQLDriverMYSQL3 f, |) T1 _0 Q/ ?0 Y& R5 @" c" N6 X2 a
- VendorLib=libmysql.dll
/ f" i$ R( ^1 Q - LibraryName=dbexpmysql.dll
2 s+ h. x. G3 L5 c* f5 W% r* D - Active=10 ]- R( [, s. B- i3 I U% p5 e+ K+ ?
- ---example----
) Z" h5 T( }; E0 ` - - written 02.03.04 by pwk.linuxfan O( C; C& @0 Z( c0 J
- * R+ E% l0 @' u( _; R/ x
复制代码 |
|