|
|
麻烦翻译一下,下面这段文章:xhan 5 w6 |3 }! O" W0 F, @& C9 `
2 w2 K( Z5 a( u-
$ ?0 w! D* H* u: |3 J3 P - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######* @* _3 P3 R" H2 C0 g
- ; E1 e5 V3 r' l: V- U
- ### What we need ###1 d* e( s) P( Y& G
- Naturally, we will need a MySQL server to store the data for us, this document ; o" P1 ]0 d9 d6 N$ T1 b/ q$ E6 ~
- will not explain how this can be done - there are documents out there for the
& m0 u8 z% A2 B8 F* X: t - interested. The requirements include a (empty) database for TeamSpeak to use2 y- j8 Z6 J" `8 e( {6 g# M
- and a user account (username + password) that has the permissions to do stuff7 f1 X3 i$ o$ q. j
- with the database. Additionally, you will need a vendor library installed on the
# Y' d1 i: ^8 y" Q - local machine, this came with my MySQL install.
& N/ q$ v( F, y; } - These instructions will not tell you how you might transfer your data from the
, w4 q& Y8 H$ z5 K8 E - SQLite database to the MySQL database, we start with a clean and empty MySQL$ z) [4 W! u+ F0 _ {& d) u+ G
- database.! d; u9 [: g7 V7 n8 m
- Some users have reported ways to import a SQLite database into MySQL, but at5 \) N! o$ } C* _
- the time of writing, there are still too many issues - check the current status
- V! p+ F5 [' W P, ] i, P - in the TeamSpeak forums if you are interested.
. f/ r' I% L; Z- m - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: D; R3 R% d+ }- z) H+ Y& @; Q0 i' f - Borland was used. This driver can only interface with the client library that ; D! z% g# h$ |8 m$ Q5 @2 n* v
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; ]: r2 o7 o# L
- client library - basically all you have to do is to use a 3.x client library as
; l6 ]* ~% r) c0 H; Y9 A G! e - "VendorLib" and a 4.x database to connect to.
2 I6 J6 Y) T& Y! i0 _ - If you need more info about dbExpress, you can contact Borland., y0 \$ B) L; X5 q9 E4 ?) b+ O8 g
- / u, F! C8 ]6 }7 Y6 q( E" [
- ### Doing the work ###, R3 B0 K. T- t) m+ ?
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' E8 w/ W/ e( X2 y - the perquisites right, just open your server.ini file, and add this section at
' `- \9 d. ~8 Y6 ~' e$ s0 B0 `1 [ - the end:$ ]! F& c1 p, W8 k$ A6 W
- ---cut here---5 E; s8 X% N) C' Y9 Z- E9 h: ]
- [DBEXPRESS]
* k% p3 o4 w# k9 u* [ - sqldir=mysql_sql
}* R! q; H5 r6 M" S - Drivername=mysql
$ Y8 Z) x/ a( ] R! a2 { X& @% l; C1 d - Database=Your_Database_Name_Here
5 Y4 x7 u- Y5 g# M+ l - Hostname=The_PC_the_MySQL-Server_is_on( ^1 F9 f" d1 ?& Q
- User_name=User_name_on_the_MySQL-Server7 v- A. ]2 K; j- v/ ?6 _
- Password=Password_to_go_with_above_user_name& q3 j3 y8 `' O+ m
- GetDriverFunc=getSQLDriverMYSQL# N: k; Z u8 q: k. v) c8 y
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ R8 b/ O1 v! I, H- p8 | - LibraryName=path_to_libsqlmy_libary' s7 ?- j M+ _/ [, ]) h- j$ U
- Active=1
5 [5 p! \" {" m( ~: u. X - ---cut here---% J4 [* _3 S7 m
- In my environment (a linux box with a MySQL server running locally) I have: N8 X, y1 x A( ]
- ---example---
, f* k9 s3 K! c+ |5 G" A9 Q. L - [DBEXPRESS]
8 `& D2 y: g9 o& U - sqldir=mysql_sql
/ J C8 w. Q" v. u) v - Drivername=mysql5 i, C- w* A& o. i; _
- Database=test
* e! o& g8 b& I8 m - Hostname=localhost
& x1 E/ D: a; [. M8 k - User_name=testuser' n% [( ~$ _/ g1 S [6 Y
- Password=my_password$ m: ~1 X, T* k; V2 H! T2 @
- GetDriverFunc=getSQLDriverMYSQL
* O* L4 T; K4 F' ` - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0: D" |5 G( |0 K, O y
- LibraryName=./libsqlmy.so
/ F9 }, p/ h! V - Active=1* c$ T; t: h" i4 W$ j0 I7 Z; h% k
- ---example---0 @& `; L% K7 i+ T5 ~* t$ q5 R
' ~5 g' s' g; V% T- On a windows box, also running the MySQL server locally, it would be:
1 c3 y( i: Z- K - ---example---
6 u' M1 `6 _* N b b9 B - [DBEXPRESS]
) g: W% W3 ]% `; U3 P' _& h( y9 R - sqldir=mysql_sql7 D4 @8 l# i; U5 |% z9 S/ E0 A
- Drivername=mysql% e& F4 f( |4 e/ V/ [3 s
- Database=test
$ o0 o m' u( ~& s; g5 M - Hostname=127.0.0.1
/ X% r! b/ L: }, l - User_name=testuser
" C2 D; z! R1 \( D' j$ | - Password=my_password. j( q5 o' ]( @" } g$ W
- GetDriverFunc=getSQLDriverMYSQL4 q/ l2 _2 j/ S; s
- VendorLib=libmysql.dll+ m4 K& O& c& s
- LibraryName=dbexpmysql.dll1 z' x7 p/ P8 I4 s: W' E
- Active=1
; |: p# o/ v1 X% { - ---example----& h' P& y; d; U/ [% k
- - written 02.03.04 by pwk.linuxfan
( N0 A- l& ^. ]* [3 f& @ - / k% p. t; V. y: G. |. ]# {8 m
复制代码 |
|