|
|
麻烦翻译一下,下面这段文章:xhan 1 p* H7 v4 k$ K* _+ M, [; r8 q
; F: U0 @* q! y9 k0 z% o, u
-
' @/ L7 U9 ~# F' M" O7 M' \7 w, s - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
1 P9 k, J: V D8 D7 Z
8 R* X+ v" T/ B- ### What we need ###
1 B/ V+ n4 Y; s9 F' v3 z7 p - Naturally, we will need a MySQL server to store the data for us, this document
1 m8 ]+ ? |+ {; e9 l: G - will not explain how this can be done - there are documents out there for the # M: ^% @8 A8 M# X
- interested. The requirements include a (empty) database for TeamSpeak to use3 o0 A; ?. @* y+ p3 D. y, G
- and a user account (username + password) that has the permissions to do stuff
! B5 r0 b+ e6 o - with the database. Additionally, you will need a vendor library installed on the2 s9 @. }1 ^! U* W0 O
- local machine, this came with my MySQL install.
. S) S2 ]$ k3 e# Q+ K - These instructions will not tell you how you might transfer your data from the
9 v' k! s, D- |! s4 ^ - SQLite database to the MySQL database, we start with a clean and empty MySQL
8 \8 F' x: i/ U8 g h) D - database.
* b' A8 q! K( t4 H% [ - Some users have reported ways to import a SQLite database into MySQL, but at V- B4 R6 c2 \. ~
- the time of writing, there are still too many issues - check the current status3 Y1 y6 e, X6 j E
- in the TeamSpeak forums if you are interested.
5 h- B9 B, u, f2 L" J+ Q& P8 p- h - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ D) Y2 o7 n% E( u' _/ i+ ^3 J7 b - Borland was used. This driver can only interface with the client library that
7 F- m4 x$ g. ^7 ` - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this/ C" L' p6 A5 y9 S1 {
- client library - basically all you have to do is to use a 3.x client library as
- O( l7 r. w6 T - "VendorLib" and a 4.x database to connect to.
. P# o4 y, Q) H - If you need more info about dbExpress, you can contact Borland.- R5 j6 ^7 K- B b3 a. m
/ t. t9 D5 H4 O8 M! F- ### Doing the work ###
. f; Y1 G, w' [, b8 Z! u ~+ b - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* L ?4 x+ o! n, a
- the perquisites right, just open your server.ini file, and add this section at
! h l5 ?% t$ Z- c0 B( H' r8 J - the end:# G7 Q" f% F# n; v1 [
- ---cut here---! j0 f- g8 N- A+ l$ P( e
- [DBEXPRESS]2 {+ w" b# {. ^) i% j
- sqldir=mysql_sql
y' m$ |7 K/ f2 A! c - Drivername=mysql
; z' D# N1 _9 Q5 [4 d4 ]' q - Database=Your_Database_Name_Here
7 A/ d: X. V6 O. s9 E+ i9 X - Hostname=The_PC_the_MySQL-Server_is_on G1 q' w5 `3 ?7 m
- User_name=User_name_on_the_MySQL-Server
: e5 _, m2 J& E8 U0 O( {7 K - Password=Password_to_go_with_above_user_name' {. f6 P0 d- L& H: c
- GetDriverFunc=getSQLDriverMYSQL
& C7 A+ e$ w* P3 V - VendorLib=path_pointing_at_your_mysql_vendor_lib
- x4 w' [, j" P% K& c - LibraryName=path_to_libsqlmy_libary ~* J2 V, x9 |# Z$ g" N) E+ N
- Active=1
- k% {, O7 Z/ {$ C6 M( k - ---cut here---2 Z# b* }8 c4 X D, c# L* R
- In my environment (a linux box with a MySQL server running locally) I have:/ x5 Q! ?% J# }) B, n
- ---example---( o, k4 X: Q$ r& l0 m, l
- [DBEXPRESS]
; @4 w& n4 u3 _6 g( | - sqldir=mysql_sql. V; {4 \0 Q- J* A, J' \/ x
- Drivername=mysql
$ |4 \7 }( H" j4 v! ^ - Database=test
+ H+ n/ p, F' X" @$ d' D - Hostname=localhost% P, G7 B+ R' X/ h9 Y: ^
- User_name=testuser
# g6 r* r) E' n( C: a L) q - Password=my_password' Z, R/ |+ y& ?$ K& B y
- GetDriverFunc=getSQLDriverMYSQL- ^+ J. ]3 q1 j% l4 ?
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
) _( k$ I; X$ w. o% p1 N" P - LibraryName=./libsqlmy.so6 \9 w5 y7 v7 S* v* i: D, X% I
- Active=1
) [8 f/ Q2 H7 D- H - ---example---( d- l! {8 M/ V; d# I
- 6 S8 h- H/ C; U- s# P
- On a windows box, also running the MySQL server locally, it would be:
8 H) N: c. E6 W6 M+ x - ---example---: H h# w6 O0 H
- [DBEXPRESS]
! ^/ o4 k% u( C4 i0 t" M4 G) f3 k - sqldir=mysql_sql, W- m2 n5 A2 Y2 \
- Drivername=mysql$ U6 m" F& ]! w" K! u; D5 X1 x
- Database=test
6 ?$ c, \* \) X+ n( ` - Hostname=127.0.0.1
, e' F% Z; e( O+ Z - User_name=testuser0 a: `4 u4 Q( O3 Y
- Password=my_password
8 C I( {2 }" ~: l$ m* ^ - GetDriverFunc=getSQLDriverMYSQL/ U: w* K0 f6 i! D2 B5 ?
- VendorLib=libmysql.dll, \0 D/ F; }, @& T. O) k5 n# P, g
- LibraryName=dbexpmysql.dll
! `4 n$ N+ q2 l/ B4 D* {9 x - Active=14 O ?- E' X+ C5 [8 m9 C
- ---example----# d% l8 S' o, Y1 ^" ^" C
- - written 02.03.04 by pwk.linuxfan9 c" |& p0 _7 k
( p# b! P5 J2 v3 E' ?2 f
复制代码 |
|