|
|
麻烦翻译一下,下面这段文章:xhan
9 A D0 n3 }9 L* u# y) L/ O, F0 i" G# y5 } R) F
- $ L" n) `/ Q) w u7 N3 |
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; J, ^; w& R2 W' Q# I; U" t - 4 V5 a# D$ P: x4 U8 r
- ### What we need ###
% v1 Q/ j$ v t7 e - Naturally, we will need a MySQL server to store the data for us, this document
' O; c+ X3 @: _% y/ Z - will not explain how this can be done - there are documents out there for the 9 `8 y4 Y g2 k$ s; l. R
- interested. The requirements include a (empty) database for TeamSpeak to use
7 g- q+ D+ b# {# C/ h - and a user account (username + password) that has the permissions to do stuff$ o( w3 L0 A, x- G3 g( a% P+ H
- with the database. Additionally, you will need a vendor library installed on the' ^& U) q" J1 s O# P. Q' q- U* d
- local machine, this came with my MySQL install.
! `5 K5 `: E) t6 A" H" _; A0 p - These instructions will not tell you how you might transfer your data from the5 l# V `" n N0 A* q8 R
- SQLite database to the MySQL database, we start with a clean and empty MySQL+ q: I% ?/ h: W: \' k
- database.
4 _4 m4 Z/ J% `" n" d - Some users have reported ways to import a SQLite database into MySQL, but at
' Q! l2 k9 B: ]% Q; E2 V3 W# ~5 d - the time of writing, there are still too many issues - check the current status9 ?: T. O( c' ]8 ]" K
- in the TeamSpeak forums if you are interested.
9 [+ @" j! A% a# L' Y& y - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) _% H" X7 l0 x/ b8 P, m% r - Borland was used. This driver can only interface with the client library that
! z% z$ n8 `8 S - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 k. ~7 P9 ?3 h; d
- client library - basically all you have to do is to use a 3.x client library as ( n) S% A' X! ^& }3 x
- "VendorLib" and a 4.x database to connect to.
& H2 x3 q6 d% n9 r5 W. b - If you need more info about dbExpress, you can contact Borland., w, L3 {4 {/ g+ q0 T( ?4 n% _
5 Z+ N' Z6 h- z9 S- ### Doing the work ###0 v6 h0 l; G! ?, G0 i
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 h0 _5 ^- S8 z9 A1 }1 ? l - the perquisites right, just open your server.ini file, and add this section at( v v2 y9 }6 z3 g" A9 n- W/ n
- the end:# m% R* O+ }+ Z
- ---cut here---, L9 t7 ?( v" D- z" U U, @: _
- [DBEXPRESS]8 y) j; R: ?5 W- m
- sqldir=mysql_sql7 |; @. |8 s5 s* h) T& m
- Drivername=mysql
2 J4 v8 p: n5 I6 m4 _ - Database=Your_Database_Name_Here
0 I' e6 d$ k" c! V - Hostname=The_PC_the_MySQL-Server_is_on
6 F' A! q: ?8 N. v) U - User_name=User_name_on_the_MySQL-Server
, y& b/ n4 S: |0 b - Password=Password_to_go_with_above_user_name- l8 a6 v+ _; v7 s) U
- GetDriverFunc=getSQLDriverMYSQL
6 k* O# h# R/ X2 E; |" [3 F" n$ Y - VendorLib=path_pointing_at_your_mysql_vendor_lib
7 ?& F1 t# _% A - LibraryName=path_to_libsqlmy_libary8 P. G* i: q( I" T( l6 m, A# s
- Active=1
% G1 w* n! t% u5 [' D$ P3 K2 T6 Q - ---cut here---
( A; @' N1 u+ i. \8 `9 s% \ F - In my environment (a linux box with a MySQL server running locally) I have:# c w4 B ^. {
- ---example---$ b4 ^; H! a! J0 r* x. m9 K% V
- [DBEXPRESS]
% X3 g6 S: M: p8 i; a0 r# T& n - sqldir=mysql_sql9 ]) v0 L/ B" Q% b3 Q5 b3 O9 Q
- Drivername=mysql
, c/ r! |9 Z% [3 V. w9 D8 G* l - Database=test
. K7 }: }7 x" U8 ~1 n7 A' T - Hostname=localhost
; s4 i# Z* |" n1 o9 e% S! X - User_name=testuser* r) K7 b# }; i. E2 A
- Password=my_password2 c$ O/ _3 v! J5 t: u' }* Z9 e* N
- GetDriverFunc=getSQLDriverMYSQL
. p, U* x, o; m$ m/ F - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 J( A. P: r. `& R3 f# b, v& I
- LibraryName=./libsqlmy.so
+ @$ N: I9 a- T, U/ h5 p: O7 } - Active=16 {* o6 ~9 t1 E% C1 U7 k1 ]. b
- ---example---
6 W' R5 `" t1 _, k - 5 p9 i y2 l) i) l
- On a windows box, also running the MySQL server locally, it would be:
4 K6 n. [! h" |3 { - ---example---2 o1 P: J' Z; i8 V
- [DBEXPRESS]
& U# }* K. C7 r \! b( X! Y/ v3 [ - sqldir=mysql_sql
/ K, |# x1 E9 O( o5 h - Drivername=mysql3 |! [& H) R8 }
- Database=test' l3 ^( I- }2 ]4 K+ B
- Hostname=127.0.0.1
* a2 L& I1 M* L) ]! ^/ D - User_name=testuser2 J+ Q9 `+ |+ Y Y. l0 j& h, I# D# [
- Password=my_password7 f! k2 [) s- S" C4 _! ^* V! s
- GetDriverFunc=getSQLDriverMYSQL( U6 J- E- v! j2 ?9 Q/ t
- VendorLib=libmysql.dll0 ~- F8 m8 s0 O8 ^2 m$ \
- LibraryName=dbexpmysql.dll# ^" P: ^8 D3 _- C( ~( R
- Active=1
, Z2 W' N) w& z% S1 m - ---example----; U \& _( ]$ h4 d
- - written 02.03.04 by pwk.linuxfan( x( Z! T- J4 }% `& `- {& s$ y
- 6 H6 g! \+ E; U3 e/ U6 ]
复制代码 |
|