|
|
麻烦翻译一下,下面这段文章:xhan 2 v+ X% E. h% y U$ p% U# j* i
D- G9 z" s. p/ R, ?* ?! z4 b8 }0 O8 C-
: o* l* F1 _ S& C - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& V# e8 c: ^7 T5 `" U - 2 Z& X' W( x6 e- N. Z
- ### What we need ###
/ g% P# r$ j5 \7 C6 Y1 k$ J - Naturally, we will need a MySQL server to store the data for us, this document
/ S$ y' U3 i' a9 O" I. D - will not explain how this can be done - there are documents out there for the
" ^) @+ I: d8 k8 C; r - interested. The requirements include a (empty) database for TeamSpeak to use/ r) O- o* i& j- _
- and a user account (username + password) that has the permissions to do stuff
: A6 X- G# t! u8 C- Z i6 S p& S) E - with the database. Additionally, you will need a vendor library installed on the( D4 h6 e. N; d2 z* s5 s
- local machine, this came with my MySQL install.' G+ h, z1 B$ z) S6 ?( i, u
- These instructions will not tell you how you might transfer your data from the& w1 m% m3 t! H- w- i
- SQLite database to the MySQL database, we start with a clean and empty MySQL! V; L: j$ n) h, |
- database./ t/ L- M% H- l! h9 {9 T
- Some users have reported ways to import a SQLite database into MySQL, but at+ ^3 X) g* I1 s& a+ M
- the time of writing, there are still too many issues - check the current status6 I# l Q5 _2 H+ J' w: B. {9 B
- in the TeamSpeak forums if you are interested.
7 g( X R0 U: t$ g$ C: m9 a8 e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) A! t- ]9 G5 W) o" B6 g
- Borland was used. This driver can only interface with the client library that
0 U' H. a, c2 D8 k1 \1 m- L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
" Z0 ?; k* A, h$ c8 Q& w9 l - client library - basically all you have to do is to use a 3.x client library as ) J6 a/ h4 b* ]( p$ v' G
- "VendorLib" and a 4.x database to connect to.) p1 k, A# |1 ^. F( k6 ?# P
- If you need more info about dbExpress, you can contact Borland.
/ i- p2 V5 o8 ~ U5 m
5 t& q6 w1 m; H: n- ### Doing the work ###
* k1 E& h4 x0 Y3 r' j- r+ ^4 z - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 S5 d$ O4 f* `8 a/ V; `6 x- \ - the perquisites right, just open your server.ini file, and add this section at
: j c R- F- ~# a4 v& ? - the end:
7 [+ I# w! h) n: p - ---cut here---
' l, x% n& V: b2 O0 X7 c% R# Y - [DBEXPRESS]
3 X/ I+ X, I' Z/ S0 E - sqldir=mysql_sql, C! l$ T& l7 ?; X% ~* ^
- Drivername=mysql. M( H! |. q5 [8 r& \
- Database=Your_Database_Name_Here
5 t& ]7 F5 a8 P6 f; R - Hostname=The_PC_the_MySQL-Server_is_on
; k \9 k/ A! m- \4 A1 \0 g - User_name=User_name_on_the_MySQL-Server
; r9 I2 Q# {% n" r - Password=Password_to_go_with_above_user_name
# F3 G$ i4 G K- X4 O! S - GetDriverFunc=getSQLDriverMYSQL( f: W) @0 ?8 r8 o" a. e. B
- VendorLib=path_pointing_at_your_mysql_vendor_lib
0 m* U" t8 I6 P" P, o0 ?& P - LibraryName=path_to_libsqlmy_libary* a% ^' r/ U) m$ `
- Active=18 j7 @1 N9 b# w
- ---cut here---
) f' t) ~8 @# \& ]+ ]+ s8 C - In my environment (a linux box with a MySQL server running locally) I have:3 ^0 L9 Z' @* o/ Y& O
- ---example--- S, e6 z. R: c9 k- U( G3 @7 p
- [DBEXPRESS]
. s0 L9 N+ V5 x+ E/ e - sqldir=mysql_sql
% A$ Q+ L0 \3 f; X1 X* \ E; z - Drivername=mysql, F- e1 u1 e2 B0 K H" ^) M' z* _
- Database=test& ~% o8 m8 L3 M. M r8 D6 [
- Hostname=localhost% j* k, D$ N* K6 x" f
- User_name=testuser% q& A2 ^, l: j: r5 r
- Password=my_password
7 t1 Q; W% C! D3 a, M/ ?" G: |$ V5 @9 W- U - GetDriverFunc=getSQLDriverMYSQL
; m" B$ }1 k6 V% u$ R - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0+ z. P6 R* y+ d1 L8 ^, X
- LibraryName=./libsqlmy.so
% u6 I8 s" F6 d - Active=1
l* W: ]; d3 ?% z. H - ---example---
6 E- w7 J% m, _1 R: {& @* i* B/ e - . w* ]+ p h8 S4 e
- On a windows box, also running the MySQL server locally, it would be:( H7 v# t) {7 C" M$ a; |& G8 o/ x
- ---example---8 Q7 j9 m. t! S O* [6 s7 ?6 i1 `2 |
- [DBEXPRESS]4 T' X2 J4 U, x7 F6 ^0 A
- sqldir=mysql_sql9 M5 u: \- N: x# r) c6 Q
- Drivername=mysql
! \( }# \- I7 ] - Database=test
: f6 c* j7 M' U. u& q - Hostname=127.0.0.1& I' Q# c( h0 m9 g2 x- ~
- User_name=testuser1 a _! Q3 e2 F+ \# M, g0 a
- Password=my_password
: g" t6 q6 O' `$ _$ V - GetDriverFunc=getSQLDriverMYSQL- N4 l. v" o" y) g# m$ o# [+ {
- VendorLib=libmysql.dll
# C; e* E' { ^$ D5 G6 \ - LibraryName=dbexpmysql.dll. U4 g/ y1 [* K, F
- Active=1$ R H5 O1 \8 W* M) P4 C' D
- ---example----
+ V8 V" x2 i: ~! e/ V$ l- x2 N - - written 02.03.04 by pwk.linuxfan1 y1 |( X" X% j, e* I- K7 W
* B! s4 Y9 J Y( U6 _/ T& u
复制代码 |
|