|
|
麻烦翻译一下,下面这段文章:xhan 1 ]6 [/ V- i8 y: C% G/ B: ^ A, l
& X5 P G# t" g8 W) u! i C7 s$ i- + g. H& g. a& ~( L e9 v0 J+ n9 V. a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ###### N) D3 G K) g( O. C) |: G$ l
- : Z. N; H* I1 r% _4 Y
- ### What we need ###
% j5 A% W% @7 d t# q+ j - Naturally, we will need a MySQL server to store the data for us, this document 2 d: v* l- ]( H1 u
- will not explain how this can be done - there are documents out there for the ) B [4 O m" @- d' u, r" C
- interested. The requirements include a (empty) database for TeamSpeak to use
! U% X8 V+ W1 `/ ~. U8 Q - and a user account (username + password) that has the permissions to do stuff; P5 P3 a. Q* Y
- with the database. Additionally, you will need a vendor library installed on the
/ V3 e1 v0 ~+ P' l& ^+ |8 z' W" V - local machine, this came with my MySQL install./ s9 M0 v4 S, H! o) ]9 A
- These instructions will not tell you how you might transfer your data from the
9 N: m) H8 V( f, J, r5 o h6 s - SQLite database to the MySQL database, we start with a clean and empty MySQL
) |- Q4 i( B/ x8 b6 o1 G - database.: Y: g" p; `6 T% T+ H' }# F
- Some users have reported ways to import a SQLite database into MySQL, but at0 z, R% }9 V" N) G, ^+ U+ \5 E
- the time of writing, there are still too many issues - check the current status
: n( F; s# K/ l# g$ E - in the TeamSpeak forums if you are interested.
M' H f) n3 G) d; C2 z* Q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
3 u0 x. _; z+ I+ T- U - Borland was used. This driver can only interface with the client library that % F. \6 c1 d! }# A, x: ]* H: H
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: h6 t3 T6 }0 @
- client library - basically all you have to do is to use a 3.x client library as 0 g6 q' x+ s* |1 `
- "VendorLib" and a 4.x database to connect to.
; W4 Y! F+ ~/ N0 } - If you need more info about dbExpress, you can contact Borland.
( O6 B/ b! B. j0 r8 Q$ v/ t1 r - + c. @0 N9 X8 Y2 ^* j1 @4 x
- ### Doing the work ###4 G: Y. q" e; Y. `4 A l
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all' Q3 C2 ^5 W2 m: e; Z6 e& u5 z
- the perquisites right, just open your server.ini file, and add this section at
' a5 L. P& \ U1 b/ ~6 C3 g - the end:
, J3 ?: \: i; ^ - ---cut here---5 f9 U$ A; }. _2 }4 M2 \7 z% P- t% k# B
- [DBEXPRESS]4 H; h" \! R2 s; o
- sqldir=mysql_sql
' N8 U; D/ ~, o/ b1 V# Z( E9 q6 z - Drivername=mysql0 U# o8 F" V& Q+ F
- Database=Your_Database_Name_Here" v2 d+ ?& {$ s2 k
- Hostname=The_PC_the_MySQL-Server_is_on
& e9 _1 Z2 z D - User_name=User_name_on_the_MySQL-Server$ ^& F7 _; I) q$ f7 d& w
- Password=Password_to_go_with_above_user_name
+ |: r$ e* f' R: P5 q6 N. b1 ^ - GetDriverFunc=getSQLDriverMYSQL
6 E# C% I# u; b# C - VendorLib=path_pointing_at_your_mysql_vendor_lib
; d% i' n" l% u - LibraryName=path_to_libsqlmy_libary* w) p2 |, q* @$ V3 @& @
- Active=1! m5 I* h% [# p0 j+ O
- ---cut here---
1 {! j1 |' V6 [. H$ F2 r* h - In my environment (a linux box with a MySQL server running locally) I have:' W1 N5 ~2 x2 ^4 {/ o+ B
- ---example---
& F k5 d" R2 g" m1 V5 K - [DBEXPRESS]
, e0 a6 j0 ~8 j. d" W! L7 s$ W - sqldir=mysql_sql
8 g$ G* V& m# ~8 r% ~% k2 f) c - Drivername=mysql! _6 f4 ~9 w( N* g
- Database=test8 m4 J1 J: B# ~" l
- Hostname=localhost
0 {' t. [6 y# z' y" u - User_name=testuser# e8 i A% M/ O7 l% E- p
- Password=my_password
9 M, J2 C- y3 e' g - GetDriverFunc=getSQLDriverMYSQL0 U8 h G1 b1 F0 l# z& i: j! E9 w
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, w( w% b- Y" Q7 a0 }$ K, N6 O
- LibraryName=./libsqlmy.so
( ^4 ?3 ~3 |% \ - Active=18 [1 L. {0 n8 @" Q/ r' ^( ~7 ^
- ---example---6 n s+ M( X# @, E
- 8 w# w7 t( w+ C$ N' f" L% l
- On a windows box, also running the MySQL server locally, it would be:
) M8 g* c& o: m! i# p( ~$ G6 N - ---example---4 d' g7 P$ |% R9 K8 s- l
- [DBEXPRESS]$ l, K) V; i6 j9 O2 r/ j
- sqldir=mysql_sql( b) V2 ~: n, }. X# U
- Drivername=mysql, g7 G+ x# y) u! v/ T. S
- Database=test# A$ L6 {/ ?8 Y$ I A
- Hostname=127.0.0.1
+ t; c- p: y" |% S2 u# L. r - User_name=testuser$ X4 ^4 w* x+ d0 ~6 Q' w
- Password=my_password
0 D* E4 @/ ~: Q7 H - GetDriverFunc=getSQLDriverMYSQL! y0 o" A6 W; o
- VendorLib=libmysql.dll
9 ]) E# t3 _7 T4 d! t( E# y9 A" u - LibraryName=dbexpmysql.dll
0 n8 X& q' R) _7 g( f; G - Active=1
8 b g' p. \4 Q) `& P+ Y - ---example----
/ `' q' D2 S; d4 W% u8 x, P4 l( a [3 L - - written 02.03.04 by pwk.linuxfan7 ?0 }3 b: o; Q* X
- 4 o4 L; @+ J& A0 I3 |0 O9 N" M
复制代码 |
|