|
|
麻烦翻译一下,下面这段文章:xhan * y' a: ^& p' N4 y) [, R
' s2 }. Y6 N5 N' {- U$ f
-
6 x- N0 ?( \% _+ L0 B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# O# x0 m% A' Y& A. Z, W& {# ]; k
$ W7 B& I6 ]* c. @- ### What we need ###
* r) Z" Q% ]! F6 ?' z; ^9 D% [, ` - Naturally, we will need a MySQL server to store the data for us, this document
; n# u6 o! v0 @2 E( M - will not explain how this can be done - there are documents out there for the $ N- ]4 C4 g: \ l+ x$ O
- interested. The requirements include a (empty) database for TeamSpeak to use* {7 f+ X" \5 \; e' x
- and a user account (username + password) that has the permissions to do stuff
1 o) E/ F+ D9 O/ ^6 D0 A - with the database. Additionally, you will need a vendor library installed on the8 r- K* v4 ^! I7 i1 t$ w' b
- local machine, this came with my MySQL install." Y! a+ r: U# C7 J3 p" F
- These instructions will not tell you how you might transfer your data from the
e9 [6 C/ J" c - SQLite database to the MySQL database, we start with a clean and empty MySQL) I) W8 x$ W) j7 L3 b0 h$ l" U6 S
- database.
0 o# \$ i/ J, s' A t# F- { - Some users have reported ways to import a SQLite database into MySQL, but at
6 b% W' x2 _7 K6 W8 j( I - the time of writing, there are still too many issues - check the current status" z; z4 {" \' Q- A" E) _
- in the TeamSpeak forums if you are interested.2 Z+ o3 V+ C9 E9 V+ r; T/ k
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( y h/ m* O$ w - Borland was used. This driver can only interface with the client library that
+ c) ^- o' G7 A. e) f7 } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
d/ b- i% l3 T" T5 q* \ - client library - basically all you have to do is to use a 3.x client library as
3 ~1 K7 N s: m+ {: {; Y# F - "VendorLib" and a 4.x database to connect to.
& h. ~+ j2 u) s6 i: _- s - If you need more info about dbExpress, you can contact Borland.1 O1 X0 V7 Z, T, q' Q
0 I3 O! }) j0 y# ^( X- ### Doing the work ###$ A) H# T9 x# F! @
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: ]5 b! e8 K2 E) j# d. V
- the perquisites right, just open your server.ini file, and add this section at
3 n& \$ b; G/ W" T0 { - the end:
0 Q( }+ p7 S S6 g! R" @ - ---cut here---2 y* @: ~" }4 d' V/ s( ?: ~
- [DBEXPRESS]4 W0 b) U6 t$ A5 M
- sqldir=mysql_sql
5 k# O% c @3 t" j6 N - Drivername=mysql
( ^, ~' o: @" d! S, ~ - Database=Your_Database_Name_Here
: h. W) c: j$ X+ G: u5 b0 @0 z2 c( V - Hostname=The_PC_the_MySQL-Server_is_on1 {" N5 H$ [5 z; J. U1 q& @
- User_name=User_name_on_the_MySQL-Server
6 b; Y& B6 c; g& C1 A - Password=Password_to_go_with_above_user_name
$ h% j3 z# L/ O - GetDriverFunc=getSQLDriverMYSQL8 ~/ d6 T' H# }- }. ]5 ^# G$ P
- VendorLib=path_pointing_at_your_mysql_vendor_lib" l# p1 o) a% p) w' V) o: D
- LibraryName=path_to_libsqlmy_libary
& z' y* T1 t3 o* H. Q! x8 ^" l - Active=1
( [( u7 p' U6 u( P - ---cut here---
0 K: y5 x2 m* _$ m1 K0 e - In my environment (a linux box with a MySQL server running locally) I have:
* s1 Z7 O+ H6 V7 {* c7 F - ---example---! r' R6 _1 G( N) M4 r
- [DBEXPRESS]
" j- h( J( Y' m2 b8 K0 W: d - sqldir=mysql_sql3 k$ m8 ]2 x3 i( e1 Y" t
- Drivername=mysql3 r( M2 ~6 ]8 `& X/ d% c# Z8 V
- Database=test5 p& f6 u! R& R( @# ]
- Hostname=localhost
; L# q; h! P; X8 t! W5 w' |8 K - User_name=testuser
3 l1 N' L; k3 { - Password=my_password
: h" @6 B2 @: b7 V% k - GetDriverFunc=getSQLDriverMYSQL& r$ b% l/ h* s
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.08 h' E! ^' ~$ Y
- LibraryName=./libsqlmy.so
3 M3 r3 M7 i9 o% i4 ?# I4 f3 z - Active=1
# h: E) d; R. W5 l* a2 Q7 s - ---example---
8 J3 ~$ v0 R# }7 b2 G
. j% j x# F- V% b* U* e- On a windows box, also running the MySQL server locally, it would be:
" w+ x. [: l# F6 v - ---example---
: N& ~2 _+ x# I - [DBEXPRESS]
; U2 }0 l: {8 m# x. o8 s1 B- F* w9 z; q: Q - sqldir=mysql_sql
4 P0 ?& R+ y8 T3 v- i7 q - Drivername=mysql# p6 q+ l. y* G! T1 w. [0 S* L* P
- Database=test
; v& W" _) G0 W! r* q - Hostname=127.0.0.1
) V' q9 D" \# [ - User_name=testuser# k) b$ ]1 _% Y+ g+ K
- Password=my_password
' L- T R7 o+ s. {( h+ T/ l$ D - GetDriverFunc=getSQLDriverMYSQL# S8 }- w) q* G8 ?) }
- VendorLib=libmysql.dll
r, ?! J4 Y& K4 f! } - LibraryName=dbexpmysql.dll) y2 P( g( a6 r
- Active=1
$ a) n" @* N1 e$ r - ---example----
& D! d5 \/ H5 }' t) H! a2 Z h - - written 02.03.04 by pwk.linuxfan1 f; I+ U/ a- B8 }3 N
2 Q# _; }2 C& j3 d" Z2 r
复制代码 |
|