|
|
麻烦翻译一下,下面这段文章:xhan
: B7 B, i! H1 f) F& \- k) ~& W$ J; h9 u$ P" T' s x% u4 l
-
8 v2 ?% N3 E* P! F - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# [# k* ` {# b1 W! d" _% e - 3 S2 I: {% r7 h4 \9 t% \7 _
- ### What we need ###5 p. m% F" @- L
- Naturally, we will need a MySQL server to store the data for us, this document s7 R# \; N- _8 I- `5 e8 X
- will not explain how this can be done - there are documents out there for the ) ]6 V' M6 S; h0 |( q- Q
- interested. The requirements include a (empty) database for TeamSpeak to use0 ~- ~# E) U5 F0 O! W/ i% \* e+ p* ^
- and a user account (username + password) that has the permissions to do stuff' I3 ?- ~9 ?9 b$ B
- with the database. Additionally, you will need a vendor library installed on the2 h, x* u/ l$ t k
- local machine, this came with my MySQL install.! j( o" N7 Z1 E8 f4 E# a& g
- These instructions will not tell you how you might transfer your data from the
! f, l, X: b& X2 r7 X+ r - SQLite database to the MySQL database, we start with a clean and empty MySQL+ T; M( a- x+ ~/ F7 ?
- database.
6 [5 Z: Q3 F5 r$ W, G4 |: v - Some users have reported ways to import a SQLite database into MySQL, but at8 ?! c( h' m) |9 \- K
- the time of writing, there are still too many issues - check the current status
( d6 f' x4 T0 N! Q3 v; A3 r - in the TeamSpeak forums if you are interested.
- W) C: x1 t" Z+ ` - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* N. D' `1 M) U, J - Borland was used. This driver can only interface with the client library that 7 H2 J+ y: f; O/ p: W5 {9 r& O; o
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% m1 X/ t Q4 d - client library - basically all you have to do is to use a 3.x client library as & p! u1 F+ {- u7 D& E
- "VendorLib" and a 4.x database to connect to.$ k# x2 g x8 \+ q4 B0 J- z \
- If you need more info about dbExpress, you can contact Borland.9 k2 ?0 E" ]6 }0 C6 K
. H$ i) s/ G9 {) {/ D: Y) @( D- ### Doing the work ###
1 _' t& i: N' z) F8 y& F d - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" S) Y; c8 W0 _1 _8 z
- the perquisites right, just open your server.ini file, and add this section at
0 u5 b+ M9 z# `: s1 b# ^7 J. A - the end:* i1 X) z9 j* y3 h/ Z
- ---cut here---" s2 g W/ T. w" S
- [DBEXPRESS]
+ o4 o/ z. _- r, |8 N - sqldir=mysql_sql
) Y8 m9 J" z( F2 b0 i - Drivername=mysql" h( A0 ^5 i5 ~, ?1 y! h4 \ F
- Database=Your_Database_Name_Here
9 j, s8 R, a) O3 V) z) \8 U - Hostname=The_PC_the_MySQL-Server_is_on9 G0 u0 X2 P4 ?* r0 z' z3 N
- User_name=User_name_on_the_MySQL-Server
0 _, y2 ~/ c' R" j, ^$ S6 I9 M# l/ d - Password=Password_to_go_with_above_user_name
6 I9 H9 p( o: W) s4 Y- f& Z- X - GetDriverFunc=getSQLDriverMYSQL
% J3 w2 \$ k% C) q S9 k0 x - VendorLib=path_pointing_at_your_mysql_vendor_lib
, ]; R% F" S8 r" ^& x" s - LibraryName=path_to_libsqlmy_libary# g* V) O# z9 O0 v9 }$ H
- Active=19 A" ]9 G x4 E4 O/ s' G8 L
- ---cut here---) L0 v) G: s0 |7 H
- In my environment (a linux box with a MySQL server running locally) I have:5 J0 j: Q W0 i2 i9 q) d# p
- ---example---
; [# \4 M: x9 r7 Y. y - [DBEXPRESS]
& A% s# e$ K4 v) G7 s2 q+ L+ l k) Y - sqldir=mysql_sql
: m, \/ Y5 X' U( b- ` - Drivername=mysql
2 C |+ C- g F8 `! V - Database=test* Y: F( v- t/ l
- Hostname=localhost
* x5 o' S0 J# s0 Z: w$ ], C - User_name=testuser
' v# \9 \% f. e: b$ q6 u4 _ - Password=my_password% Q# K7 W! m0 _" {
- GetDriverFunc=getSQLDriverMYSQL! U3 M9 e! r& G
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0# U" y( x: ?' ~+ b+ s7 [" E
- LibraryName=./libsqlmy.so8 t- m+ \7 ]! I# x
- Active=1
3 U; H# S2 R) q; v% [7 i - ---example---0 B6 l( p7 @3 w9 z) e
( g5 n- }4 I. }9 x& j- R+ B; j G- On a windows box, also running the MySQL server locally, it would be:& i/ Y( B, Y- D( K, |" b" V) _
- ---example---
* {0 a5 B- z) ?0 t( i2 M$ U - [DBEXPRESS]8 X" i, O. }: {+ x# M. r( C, X
- sqldir=mysql_sql
/ d) Q; d0 A: _- Z1 k. X - Drivername=mysql0 v; ?! e* h- ^! G
- Database=test
( g. V T5 E( _* j5 F0 D4 V - Hostname=127.0.0.1
l* g4 m+ ^. B - User_name=testuser! l5 Z8 }+ q& s. L' d }& e
- Password=my_password0 P; V# W* R6 ]+ ^
- GetDriverFunc=getSQLDriverMYSQL
, ]* W3 h" O0 Q: Y. [0 F - VendorLib=libmysql.dll
* l+ k, U, f0 _+ C0 ^ - LibraryName=dbexpmysql.dll+ ]' u1 B& c5 K1 w0 n
- Active=1( j% g2 m a- D' [0 S/ P
- ---example----0 X9 v* C. x0 }$ B
- - written 02.03.04 by pwk.linuxfan; e; m, p8 e2 G
) F6 @+ v- n, ]3 h" I' S/ c; f
复制代码 |
|