|
|
麻烦翻译一下,下面这段文章:xhan
# Z( J/ q$ B0 I$ O( s% _8 A, k1 D
* y! c: z' p" D+ [! S. j-
0 K$ B7 N4 P- l' G$ b1 Y - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######* e# n6 Y8 H+ O% p. g
D$ O2 c/ s* E2 d5 f5 v6 S- ### What we need ###, R5 ?- I7 b; j, w4 d6 |
- Naturally, we will need a MySQL server to store the data for us, this document ' }% a, x) Z3 p
- will not explain how this can be done - there are documents out there for the
% |0 p$ u# q2 H2 k Q! U/ K+ a. U - interested. The requirements include a (empty) database for TeamSpeak to use
; X! `$ G5 I" O: X: B - and a user account (username + password) that has the permissions to do stuff
! K4 a, t; a8 | E' a A! }0 y - with the database. Additionally, you will need a vendor library installed on the9 r. C9 ]. m+ \ B
- local machine, this came with my MySQL install.5 a% F1 m: W! t' f, G, \. h9 a
- These instructions will not tell you how you might transfer your data from the0 H" ^. X( z% M& R
- SQLite database to the MySQL database, we start with a clean and empty MySQL
7 m% E' s$ N5 @+ n0 n: f2 ~' p - database.
* X9 U- p" p: M - Some users have reported ways to import a SQLite database into MySQL, but at
# P3 S1 N: ?' _6 c, h - the time of writing, there are still too many issues - check the current status$ ?/ [4 V! k# D/ e
- in the TeamSpeak forums if you are interested.; w1 _6 N4 ^) d; r
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
8 C7 D0 z7 c5 c$ Z9 \9 H - Borland was used. This driver can only interface with the client library that
' t7 J# k6 k7 q/ M W3 t& _1 ? - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 a. b5 r$ ?% j( U" N4 ~
- client library - basically all you have to do is to use a 3.x client library as
! H& i0 M( M* m+ Q - "VendorLib" and a 4.x database to connect to.
8 _- g% z5 W$ e+ t8 l: f/ ] - If you need more info about dbExpress, you can contact Borland.% U& [# N6 F( A( f
8 p# j* a* @ {3 }- ### Doing the work ###
6 w$ O2 u* g& f( e: Q: ? - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 X. I& {8 Y# J - the perquisites right, just open your server.ini file, and add this section at* J f, x' T2 _- W7 @
- the end:
5 K/ ^5 R2 y, i& q1 J; Y3 u6 S - ---cut here---3 O6 S2 ?+ d# y0 R
- [DBEXPRESS]$ @/ w( d$ m& b. \( T
- sqldir=mysql_sql1 W' A% ?, v$ x# p" U4 @# y2 j; f2 `
- Drivername=mysql
: @8 e% j6 {) z; M - Database=Your_Database_Name_Here' i; J2 l5 c7 U9 ]7 q
- Hostname=The_PC_the_MySQL-Server_is_on! s" F# {2 z8 `( U) b. f
- User_name=User_name_on_the_MySQL-Server! d/ o. `+ D" e3 }
- Password=Password_to_go_with_above_user_name8 C9 u$ y& K% \9 t# }! z, @
- GetDriverFunc=getSQLDriverMYSQL t3 M" L) C) ]) A
- VendorLib=path_pointing_at_your_mysql_vendor_lib
* v3 ^/ A6 E0 f. r6 C& w1 e - LibraryName=path_to_libsqlmy_libary
$ }- {$ p i+ Y/ H - Active=18 ]6 ^8 R# w6 w- e& Y. K
- ---cut here---: {1 \4 ]: }! M# n) X. l! t. Y
- In my environment (a linux box with a MySQL server running locally) I have:
0 T/ w% t- H# C, P: x' `9 I - ---example---
, ]" E) B: c0 m \1 M- j( i+ T* P - [DBEXPRESS]
8 v% h1 o. f `& x5 ? k1 ] - sqldir=mysql_sql, L( H$ Z# R, k2 R! k
- Drivername=mysql
4 h0 J8 Q' I! x+ u8 T3 Y/ y# _ - Database=test( P8 X/ Z. c" h
- Hostname=localhost, T5 G" a, e' t9 }" _+ t7 F; K
- User_name=testuser
$ y `! C" m' m% P1 k3 Z+ y - Password=my_password
2 D4 Y; l& P% d4 ~/ T f$ o l0 I' T - GetDriverFunc=getSQLDriverMYSQL
6 }7 n: w# M& e3 g3 W9 a+ P( V - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, L0 j* W% L9 t& R( e' X( w0 }6 z - LibraryName=./libsqlmy.so
/ }9 r1 I* h* }0 ~$ C6 Y1 s: n: u( \; m8 t - Active=1) B9 D. l% g' i2 [' d
- ---example---$ H6 t8 w4 @: `; A0 T# |" p
- 3 v+ o8 {" j: s+ C4 W1 b. s, ?
- On a windows box, also running the MySQL server locally, it would be:, _: {0 |, u5 |# D% p/ B7 }+ R
- ---example---, S$ i# k+ x+ R p0 H( |4 {
- [DBEXPRESS]
$ |9 t2 A6 g1 B( [) [3 f - sqldir=mysql_sql
0 ^ @; U: h5 ~; S' l2 y# G; a - Drivername=mysql+ h; w0 j$ b* C* W
- Database=test$ _7 @! S$ ?: X; c! B9 U
- Hostname=127.0.0.1
1 @. g+ @# x3 e0 L" O! ^ - User_name=testuser
/ x. M8 D% }6 j - Password=my_password t* J: B, |) k! Q& H
- GetDriverFunc=getSQLDriverMYSQL
( D+ x# ?* M. w3 a% Q; u - VendorLib=libmysql.dll
x+ b: N* e& h. q; f% ]" O - LibraryName=dbexpmysql.dll
. V9 M! }; `3 w/ d; x* e2 U - Active=16 R6 N; ?0 O0 O! }% v8 i
- ---example----% |! A% y: V) l J. t; ~+ \
- - written 02.03.04 by pwk.linuxfan
# R4 p n; _/ P
3 m& i7 ^/ f" ?
复制代码 |
|