|
|
麻烦翻译一下,下面这段文章:xhan
- Y/ R7 Y9 |$ h0 G) b6 x5 [- w/ r$ j r5 U8 d8 y; o8 K
- 9 Z% C% y! V! ?! `# E
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 Y% W+ q1 {1 {3 u0 S% ?$ h
( c! J$ t; D6 k' c; G7 i0 r! T9 t( t- ### What we need ###. h* o* [8 v' J, D/ |
- Naturally, we will need a MySQL server to store the data for us, this document / U7 q! x) T! P( l5 F
- will not explain how this can be done - there are documents out there for the
5 j& e, R3 i8 K - interested. The requirements include a (empty) database for TeamSpeak to use' M0 s2 G3 e! v# H- K
- and a user account (username + password) that has the permissions to do stuff
4 _$ H1 b5 x5 s& N - with the database. Additionally, you will need a vendor library installed on the
. v$ d1 Y7 ~" M7 J; \; d- ` - local machine, this came with my MySQL install.4 a5 w6 P- Z: }: Y) B% {- {. L6 j
- These instructions will not tell you how you might transfer your data from the: c9 }! h2 E/ N. M) H4 d8 ?; P
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 D3 a3 z) `7 d+ q/ L# }' {2 i
- database." y" @* b7 Y. G8 n* z. L& a- p
- Some users have reported ways to import a SQLite database into MySQL, but at
) b1 p* K$ V% f! U; } - the time of writing, there are still too many issues - check the current status2 Q* I8 i# _, m
- in the TeamSpeak forums if you are interested.- m. J) Y- i' Z9 u+ S
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from5 H7 q1 [( A$ T( T9 y( ]$ X4 M) W
- Borland was used. This driver can only interface with the client library that _9 w% n& r7 Q
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this$ M1 _9 S4 ?$ a- s
- client library - basically all you have to do is to use a 3.x client library as
I7 [' i) |$ r, j3 _0 z6 O - "VendorLib" and a 4.x database to connect to.
0 B) L7 q) G5 w: o: l/ z. d% H" X - If you need more info about dbExpress, you can contact Borland.6 _, T$ V; K' [5 V2 j
( Q# q3 h' {9 W9 B) Q- ### Doing the work ###7 }) f" a' A8 l0 K, b5 z1 q4 i
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
& G& V; i# k8 l3 c- L - the perquisites right, just open your server.ini file, and add this section at1 o* L" x6 y+ {5 x
- the end:
' C6 r$ @3 G$ p4 T - ---cut here---" q; p+ R8 g: @: }; Y0 H8 F4 l
- [DBEXPRESS]
1 C% \6 o* A7 v$ } - sqldir=mysql_sql0 W! L7 S( P! V- R
- Drivername=mysql5 d: @7 ? f& O* M* t( x
- Database=Your_Database_Name_Here
/ q- D8 e" J) J5 F& g3 k - Hostname=The_PC_the_MySQL-Server_is_on
9 i6 n9 |5 I, e - User_name=User_name_on_the_MySQL-Server
4 e2 X* G& e- T5 Q! ]" T3 ?0 A- ` - Password=Password_to_go_with_above_user_name& d$ e9 G5 u0 F2 a8 q! w1 e6 A
- GetDriverFunc=getSQLDriverMYSQL3 u( |2 H/ d- K- @9 W1 L+ ^ G7 A
- VendorLib=path_pointing_at_your_mysql_vendor_lib9 ]: J4 v) G) H7 j4 I
- LibraryName=path_to_libsqlmy_libary0 @% u; H7 W/ H. M; I% f8 z* j+ E
- Active=1- \6 r1 K4 |* E/ v& e7 O
- ---cut here---
& ^& o: r- `0 |( R9 B: B( m - In my environment (a linux box with a MySQL server running locally) I have:
?2 d/ z- ~/ J0 \/ e4 y! V, ]5 i - ---example---! O8 o% j) [' q1 O# c5 N
- [DBEXPRESS]% W7 P, n0 z K- F2 K+ x
- sqldir=mysql_sql
. O5 ^2 C! [; t: J3 ?& l$ e - Drivername=mysql0 e4 [; t3 |, d) W
- Database=test
" u5 N, K5 [# S/ p - Hostname=localhost
9 D2 r) ?% W8 f! y; B% c- m - User_name=testuser0 c4 |4 o! ]1 j! x7 v: ~
- Password=my_password
( \9 a& L0 V* V - GetDriverFunc=getSQLDriverMYSQL
2 z: p }$ w: | - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% Y; C0 H1 R+ a5 k
- LibraryName=./libsqlmy.so5 @" ?2 x" k4 |, V) S
- Active=1& e9 e' P1 X R' \7 b
- ---example---+ e4 T6 V4 x5 ?- K( [7 O; X
- , d+ @- a" t5 _2 v- l9 M4 |- q
- On a windows box, also running the MySQL server locally, it would be:2 U6 u$ e3 U# w9 n J
- ---example---: c3 H8 K: G: A: Y/ E
- [DBEXPRESS]
! r; }0 U4 y1 V1 V+ `# E* X - sqldir=mysql_sql
: y m- Q: V: n: N6 Z4 ?6 j$ q - Drivername=mysql/ ]% ~$ B! s3 M' s2 I" X
- Database=test+ g& I9 W4 W: G9 f$ d! `
- Hostname=127.0.0.15 p9 K) q* u% ?5 [- J. n
- User_name=testuser
2 N& T* @5 u* s1 @+ m) B; D+ _ - Password=my_password
3 T9 \" d5 y3 x) J" m$ A, G+ | - GetDriverFunc=getSQLDriverMYSQL
! @8 \. [1 W; ^. b v, [% u - VendorLib=libmysql.dll
7 `5 J: R7 x: `; _& |0 R) ~; q/ k - LibraryName=dbexpmysql.dll
7 r7 k; n' ~; _ - Active=1
' \: X* ~8 e' [- h- D4 M - ---example----
& S5 u8 w; v* l- I - - written 02.03.04 by pwk.linuxfan
' y \* L' r3 Q - ( l' [7 H E, R' F- E( P+ x7 m* n
复制代码 |
|