|
|
麻烦翻译一下,下面这段文章:xhan ; Z, T* W% d8 ]0 M; d3 d+ @- b6 F/ h
0 r) m/ i" f' @+ E8 y9 m8 t% i-
* _2 I% ?' \7 ]% f t - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 i" s5 u& V+ o, H, {$ l
- - x5 X" G r6 j
- ### What we need ###
0 j3 V6 U; G5 ~2 o - Naturally, we will need a MySQL server to store the data for us, this document
, r, Z$ T$ ?7 W2 F% o6 L2 d - will not explain how this can be done - there are documents out there for the + {# V( d8 a9 L# Z1 p/ e- n
- interested. The requirements include a (empty) database for TeamSpeak to use( p7 }! c9 y& Y$ E$ t7 _
- and a user account (username + password) that has the permissions to do stuff
8 ?$ E. Z' R5 r/ q7 Y - with the database. Additionally, you will need a vendor library installed on the
' K: s0 ?/ y' L: i - local machine, this came with my MySQL install.0 E/ w! g$ v7 D/ [- K3 O# O6 W% ^
- These instructions will not tell you how you might transfer your data from the
4 _1 R0 `. f d8 e( {. @% Y5 k - SQLite database to the MySQL database, we start with a clean and empty MySQL
; Z( y) \, g! n - database.8 @- T; Q' A" Y* p1 c6 L( B
- Some users have reported ways to import a SQLite database into MySQL, but at
; f) y. B/ {/ i% ? - the time of writing, there are still too many issues - check the current status
$ Y3 k0 U% m. a( U4 k' U" j4 K - in the TeamSpeak forums if you are interested.# v7 G( z9 ?, _/ B3 s* p
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from, R& J3 k' W6 y; h7 d
- Borland was used. This driver can only interface with the client library that 8 n& V1 @( A# e2 D; p" @. R
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
! T0 x/ Z. H# N, j2 K - client library - basically all you have to do is to use a 3.x client library as
9 s6 N+ C- l9 b, O; I' { - "VendorLib" and a 4.x database to connect to.- _, l4 K+ n7 m$ O. v @
- If you need more info about dbExpress, you can contact Borland.
) E2 p0 E3 z0 ^) x: y' b2 Y
, A. ]6 I# u$ P, l; x- ### Doing the work ###
0 x" Q! L* C C: X0 t- g$ L# z - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: Q, L3 j' u7 C" G, S; a9 C8 N - the perquisites right, just open your server.ini file, and add this section at
. j% h+ E# q( h A - the end:
: J0 |0 T: R7 U; h4 b& @+ ~( [ - ---cut here---) C5 j' ^- V. P2 w! Q5 q
- [DBEXPRESS], t' f S* X- z( n' O4 u
- sqldir=mysql_sql( c( L) ^1 m" g9 p
- Drivername=mysql
# G0 v: X# ^" d8 R% D. ]2 p8 W - Database=Your_Database_Name_Here3 T$ @" ^# N. x V9 B$ ^& h
- Hostname=The_PC_the_MySQL-Server_is_on) |4 n( ^7 v; O Y/ P0 d0 i
- User_name=User_name_on_the_MySQL-Server! y8 V- L- j9 r0 X
- Password=Password_to_go_with_above_user_name
$ W+ d+ k" I' P) r' y - GetDriverFunc=getSQLDriverMYSQL
! h1 ~8 d, R7 f* w5 r: ?# E - VendorLib=path_pointing_at_your_mysql_vendor_lib
+ e% ]; l$ S) e6 n, A' I9 ^ - LibraryName=path_to_libsqlmy_libary
4 N! B5 D' Q4 I( c( l' y/ v! x - Active=1
% E, O9 M4 i$ I: J0 j. @' z9 c - ---cut here---5 y( l2 p* y/ H& h0 z8 h2 M
- In my environment (a linux box with a MySQL server running locally) I have:
2 N9 ~4 V3 v2 D( d: \/ I9 Q - ---example---' Y0 K0 x6 |" W* s# Y8 w0 Q
- [DBEXPRESS]
* v" N0 z$ V6 w, \% O8 Z - sqldir=mysql_sql
4 ~/ R" @: w4 o0 [! a - Drivername=mysql/ W# z# `& ^4 j' C. P/ s
- Database=test$ v% J# [0 m1 G* V; |3 P) _& z& y
- Hostname=localhost& _" R' y1 ^3 _. T# z/ Z
- User_name=testuser
, G. M) o `' o" I4 K - Password=my_password
& S/ G- X' D6 Z+ W7 u; U - GetDriverFunc=getSQLDriverMYSQL
/ V2 P; G2 ? E( a1 R - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
7 L8 ^4 ^; y+ q. M0 w7 c. T - LibraryName=./libsqlmy.so9 p v6 G' [6 o! p+ W( n6 T
- Active=14 H: l! j0 n0 @, Z S
- ---example---
/ {' w# @5 `2 o# L
: P7 l; M j7 v/ m! [% A- J$ \- On a windows box, also running the MySQL server locally, it would be:4 m# i6 h! u0 ?2 a/ W, V
- ---example---/ d% [' B" Y. ^+ {, V! P) ~* W
- [DBEXPRESS]
% ? {5 @" [; ]/ P; o3 a- {$ c9 S - sqldir=mysql_sql& f- z5 i7 B0 u0 {! z
- Drivername=mysql
% y/ z! H/ Y' l% v. [ - Database=test' }; V3 m4 t x1 }
- Hostname=127.0.0.1
k0 B8 @: o* g# C7 ]( T: O - User_name=testuser
8 ?0 V# i! J5 t' A2 \ - Password=my_password i$ W+ W( l' O- }# W7 g6 D2 ~
- GetDriverFunc=getSQLDriverMYSQL
, N/ ?6 a, j9 y, X2 i, ? - VendorLib=libmysql.dll" N* I S) R1 ~2 E: r! V2 p% q
- LibraryName=dbexpmysql.dll) R: m2 \5 e+ H8 e% b
- Active=1
6 j% `/ f( ]2 m" k/ g) N" c* s - ---example----6 A6 Z: d) H7 V" w; S
- - written 02.03.04 by pwk.linuxfan
2 Z9 O* Z! x2 O V, W' t+ ^/ d- w
" A1 r9 z; s3 |) e- k) J
复制代码 |
|