|
|
麻烦翻译一下,下面这段文章:xhan $ Z8 k2 S# ?: V! [# k0 u; I
( t) _/ a' J2 \ {; T* {4 u4 \
-
0 r0 E: i2 p R7 Q) P* ? - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######! @/ I- j2 x# {- X" B4 A. c/ S
) p! ?9 P- o# A; p e- ### What we need ###
- J* L3 @, f& G: e+ j1 G - Naturally, we will need a MySQL server to store the data for us, this document 6 g3 i. |3 F# |! `* ~5 m5 b% P% ^
- will not explain how this can be done - there are documents out there for the
$ K8 O5 x! ~6 i3 f - interested. The requirements include a (empty) database for TeamSpeak to use
, t; `- q, o2 _" W3 k6 O8 w - and a user account (username + password) that has the permissions to do stuff
2 G' v8 ~- V3 b, s' L& S: Q0 I0 P - with the database. Additionally, you will need a vendor library installed on the
3 d0 [1 B7 `. r' K; O8 j1 y6 e - local machine, this came with my MySQL install.
8 _* w! Z' m, P8 p7 B$ q - These instructions will not tell you how you might transfer your data from the) `' h8 `5 U+ N$ d+ W8 p- Q
- SQLite database to the MySQL database, we start with a clean and empty MySQL, X8 ]+ Z0 b1 L- [/ z- T: r
- database." `/ K& a. a. L8 @( I0 L
- Some users have reported ways to import a SQLite database into MySQL, but at' y* R) o% M& Y$ {6 r" w: o
- the time of writing, there are still too many issues - check the current status8 C W' [# m% @3 E; B6 L* T
- in the TeamSpeak forums if you are interested.
: p+ j# {: p1 s' `# V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" I6 z5 f, T* b( B, d# N. t - Borland was used. This driver can only interface with the client library that
+ p7 W9 _2 }! U3 Y( @ E. a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: h, `. }( v5 |3 m - client library - basically all you have to do is to use a 3.x client library as ( }, f0 g8 D9 e' Y9 O3 k% M4 ?
- "VendorLib" and a 4.x database to connect to.
) ^- s% t: P: e/ |0 i8 S - If you need more info about dbExpress, you can contact Borland.
) `5 g: d, O% k) f' I5 m# E# Y
8 \( f/ J6 P+ ^1 D% A' i- ### Doing the work ###
. J) a2 @% U) h1 c2 O7 e6 ^ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
1 H! U; z. l2 g- ^* @. R; k - the perquisites right, just open your server.ini file, and add this section at2 i) q; `) k. I& @0 ~! }' [4 `
- the end:2 n* \) y& _2 a
- ---cut here---) V8 o" Q, ]' G+ o5 _; A; Q$ ~
- [DBEXPRESS]9 D8 y. P% y% D( E0 O# U
- sqldir=mysql_sql
7 h1 _6 L @4 _) x6 X/ E - Drivername=mysql0 D- d! w1 C4 b# D; L# L, F
- Database=Your_Database_Name_Here; Q; B! S9 @* x5 N- V
- Hostname=The_PC_the_MySQL-Server_is_on& g' @0 [7 O& |8 e" |7 T$ ~ V
- User_name=User_name_on_the_MySQL-Server
4 m& s1 q, `( o- [ - Password=Password_to_go_with_above_user_name$ r1 \- C( z* l; s; ~7 i; v/ W
- GetDriverFunc=getSQLDriverMYSQL/ ?6 t1 Q H+ d8 g7 u6 k
- VendorLib=path_pointing_at_your_mysql_vendor_lib
; _5 m5 M4 `! ]0 n/ S - LibraryName=path_to_libsqlmy_libary# y# Q9 ]2 v& I8 S: Q$ k$ t6 `
- Active=1* A5 ~& a; c. M, f, D$ L5 d/ S4 W% ~
- ---cut here---
: E$ A% f1 s+ ]2 C6 G - In my environment (a linux box with a MySQL server running locally) I have:- V: o9 t5 ?" K% k
- ---example---' K! ?/ K {0 l- v1 g/ ]
- [DBEXPRESS]5 c9 l1 J' {6 R9 V/ z' Y2 [2 f& A) t1 c
- sqldir=mysql_sql" }; K2 J' K/ c- h. P
- Drivername=mysql
1 {5 _4 z/ B! l: n+ O - Database=test
' P8 A% A# o4 M- ]( T+ F9 P/ m6 {+ c - Hostname=localhost
# d7 c* P! P# A# a) @ - User_name=testuser! F4 z8 l3 M7 H, p0 {1 T
- Password=my_password+ v$ o5 h9 n- h
- GetDriverFunc=getSQLDriverMYSQL
8 k* w- X- E9 F - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 z/ J P$ \4 e9 M8 m% H
- LibraryName=./libsqlmy.so
( G8 n' `, f V; | - Active=1$ {/ o! [' e" S% c6 E' ]% I
- ---example---
* C: ^' K# \1 O; R) W
2 j H8 e( B. b$ z4 J" J6 M- On a windows box, also running the MySQL server locally, it would be:
, R9 @+ K. B! a/ D$ }1 o j8 r3 { - ---example---
3 \; E- N/ ?$ X' \1 J }6 \8 r: r0 P5 V( ~ - [DBEXPRESS]
9 w7 Z2 q$ A! p, Q - sqldir=mysql_sql
# R! { |4 j/ i$ ] - Drivername=mysql. l% J. m9 g/ e4 _; y6 U
- Database=test% B8 \# P7 Z" T/ a
- Hostname=127.0.0.1
! i' k/ v! ^% X+ Z9 ?7 }7 F6 Z" ^ - User_name=testuser; F4 ~" U: V( P, p! Y8 ?, B
- Password=my_password; N2 N8 z( N# C( X! T: V
- GetDriverFunc=getSQLDriverMYSQL
# r( J. [& d) ~4 _7 } - VendorLib=libmysql.dll
8 F; X" \7 j V7 ~; q$ u7 x - LibraryName=dbexpmysql.dll3 z# J% q4 ?: `) Y9 j4 l( `
- Active=16 y. G! t% F5 z( v% [- W/ p
- ---example----, N% `& C$ Q. K1 ~- h
- - written 02.03.04 by pwk.linuxfan
* i& z: H+ s6 V6 q2 _ - # M; V; f1 I6 X; R( @* A* P; ?
复制代码 |
|