|
|
麻烦翻译一下,下面这段文章:xhan
) r% s9 `* _, \5 i' T; D! n3 u' |' @2 r! c3 ^
-
/ m1 x3 i5 G# V8 U7 F- S' h - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) D5 ^+ `' z( Y
; D& ]4 @+ t# @1 Q- ### What we need ###
& k3 _# i& f, k6 b8 k - Naturally, we will need a MySQL server to store the data for us, this document
3 b1 W/ _# }' i9 [; F - will not explain how this can be done - there are documents out there for the 7 D5 I; K- Q+ D) E* k
- interested. The requirements include a (empty) database for TeamSpeak to use' U1 B/ q) O& s; E/ u3 T
- and a user account (username + password) that has the permissions to do stuff
+ e& A. z. O5 L- d - with the database. Additionally, you will need a vendor library installed on the# P3 \- ?$ |6 b1 g7 }0 |
- local machine, this came with my MySQL install.+ q1 c% O4 a: m
- These instructions will not tell you how you might transfer your data from the
- h0 i3 m5 D- o6 D - SQLite database to the MySQL database, we start with a clean and empty MySQL
/ ?# S$ U, f1 `6 t - database.& f, ^1 A: t9 C" r
- Some users have reported ways to import a SQLite database into MySQL, but at
! L' H* ~( r+ d( v - the time of writing, there are still too many issues - check the current status W0 A! H0 E) e; s" B: ]$ [: g2 Z
- in the TeamSpeak forums if you are interested.
8 R1 |+ c, `4 n7 H3 x0 P - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ P4 ^; T( L+ v, M/ E' a& R( S3 S
- Borland was used. This driver can only interface with the client library that
. `, c- R9 B4 g* \ R6 B$ J# j+ T - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: y) Z' m! ?- n8 l/ W$ N - client library - basically all you have to do is to use a 3.x client library as
% F; n5 N; t) p2 J7 } - "VendorLib" and a 4.x database to connect to.
2 w/ k2 y `# `/ R1 i - If you need more info about dbExpress, you can contact Borland.
6 c* t }+ K5 h* d
* ~" {5 |! o7 K1 B- ### Doing the work ###
7 ?$ g, @8 _. W @* A0 }5 u% I - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
% G' R' }) x) z% s - the perquisites right, just open your server.ini file, and add this section at6 ~8 X# a6 I6 B# u
- the end:
" M! u( R2 D* y5 { - ---cut here---& m% a- }8 ~* Q7 N; S) y! e- g
- [DBEXPRESS]
# f9 r, V& I5 x6 x' G/ _& i - sqldir=mysql_sql: I" ^# `; w% ^& e) e: X( V. B
- Drivername=mysql
" r2 H0 D" { s7 `& q$ U - Database=Your_Database_Name_Here* k) t, w5 x, `% J( {
- Hostname=The_PC_the_MySQL-Server_is_on
8 R1 u$ w; w* Z - User_name=User_name_on_the_MySQL-Server
- I1 p7 y7 j% ~" y - Password=Password_to_go_with_above_user_name
* W$ g5 v. P9 S! g" ^- q0 t - GetDriverFunc=getSQLDriverMYSQL
5 {( Y* T4 P B9 T, [ - VendorLib=path_pointing_at_your_mysql_vendor_lib0 A: f" e7 {+ y" \% R. l0 j
- LibraryName=path_to_libsqlmy_libary
, P$ u, @" w$ ?3 R - Active=1$ y% b F: M3 v% ^6 k! j" p5 A( g* V
- ---cut here---8 ^1 D6 e: R. A! Q- V
- In my environment (a linux box with a MySQL server running locally) I have:
; R2 y. h0 n e2 O; ]) V: f - ---example---' w6 v7 s7 F" x. Z
- [DBEXPRESS]
+ {' B n p5 w* w - sqldir=mysql_sql6 `% L6 \8 D+ |0 |9 I( N
- Drivername=mysql5 _% {6 ? |& ^3 w
- Database=test$ P2 A* l( D: @/ d% o' X* y
- Hostname=localhost9 D' S. @: J8 n/ v$ u
- User_name=testuser! _$ k# ^' Y- O5 {0 y) f- c
- Password=my_password, X d1 t( R/ _3 S- n
- GetDriverFunc=getSQLDriverMYSQL: P/ ]$ D7 S6 E- P
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.04 f o/ S" j' n$ P5 \
- LibraryName=./libsqlmy.so1 c7 m$ N) I ?
- Active=1
d: C, o. j w7 x/ w6 y9 I" z. a2 D/ T" K - ---example---+ S; H9 c; C& A4 J: w
1 K% K* _0 v% y* N$ A3 k) C( h- On a windows box, also running the MySQL server locally, it would be:$ W: {2 s. u5 W" o$ l+ z
- ---example---+ I# Z) [7 h9 f' A# l! p
- [DBEXPRESS]1 s$ j' P; w1 C
- sqldir=mysql_sql4 Y. U6 b4 \" a3 t# j1 v0 o, N7 n0 D
- Drivername=mysql+ g2 t j- ?- s7 l5 m6 M
- Database=test1 d- Y& F0 x6 @# ^; b
- Hostname=127.0.0.1
# r. a4 V" d$ ] - User_name=testuser
! Q! l% |7 ~1 e' X0 x* f$ }1 Y - Password=my_password7 C8 I* O6 Z W# s/ \6 m: p, `9 Q$ L
- GetDriverFunc=getSQLDriverMYSQL w. E4 S+ ~8 Q# t% Q/ t( p
- VendorLib=libmysql.dll' M% B H3 k- B$ c! y. R
- LibraryName=dbexpmysql.dll
" i* d Q# G1 o- i8 Z6 L* C' h - Active=1: ~- k! I- h/ }. k+ d
- ---example----
' |' L( f7 _6 E' l1 n: l* v+ { - - written 02.03.04 by pwk.linuxfan1 `' h+ \3 r0 x
& X+ w7 z# }" f8 S0 N+ c
复制代码 |
|