|
|
麻烦翻译一下,下面这段文章:xhan
. O1 D, M. n6 b/ L0 E+ \# ?- C: g
m, Q" m" Y. Y% S/ l9 e4 B b- O- 0 B( n/ m4 H$ U& g2 f
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( _. i% B/ v; u, e Y - , e0 i, p. D+ S* E m% i, a" z
- ### What we need ###. u" K) i$ ~2 ?$ c# d
- Naturally, we will need a MySQL server to store the data for us, this document
# ?" H( L9 p" Q E( m - will not explain how this can be done - there are documents out there for the
, t5 f# ~: ~5 u1 ] - interested. The requirements include a (empty) database for TeamSpeak to use
% T* K0 H; z+ P, C3 _3 K. ]9 J% O/ D - and a user account (username + password) that has the permissions to do stuff6 S1 p ]! J; h" K* @
- with the database. Additionally, you will need a vendor library installed on the
. a. c' d% r3 l3 @- ?& ? - local machine, this came with my MySQL install.
6 [5 w; u) [8 G# r! Y - These instructions will not tell you how you might transfer your data from the
4 m: J n' E0 M/ P6 Q2 s - SQLite database to the MySQL database, we start with a clean and empty MySQL+ q3 X6 M1 {' l7 J
- database.
# Z0 s j% e* {+ m# ^3 r& U - Some users have reported ways to import a SQLite database into MySQL, but at
# h& B, R7 Z7 Z - the time of writing, there are still too many issues - check the current status p) X) r2 m( v+ Y! ^- u; n" W" y
- in the TeamSpeak forums if you are interested.
1 v7 X4 f8 R" b9 d+ H1 P' h& Y - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* I; l6 Q; z' d9 m/ N" @ - Borland was used. This driver can only interface with the client library that
- J6 `# q$ ^$ u) V$ j6 A9 g7 H - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ I' S$ R; Z" ]$ \3 h6 f, T
- client library - basically all you have to do is to use a 3.x client library as
5 m1 M4 Q9 l" o8 B% s5 @ - "VendorLib" and a 4.x database to connect to.3 X, h) @4 m7 B
- If you need more info about dbExpress, you can contact Borland.4 G/ ~, r0 x' H$ ^2 r' w
- " p9 \6 G b. c. w" j5 s8 H3 V
- ### Doing the work ###
; b2 U O8 d3 u+ M4 w# E - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( [" x, Y6 V& ` o; t9 e
- the perquisites right, just open your server.ini file, and add this section at
1 E5 R+ {! t& q8 k5 r" ` - the end:$ O& J0 d) ]& U( [8 [# e" _6 @
- ---cut here---, y# K; k% i# q
- [DBEXPRESS]. Y/ s4 `7 |5 `- q
- sqldir=mysql_sql
/ N% y# c/ ~0 K; j( r1 T - Drivername=mysql8 W: N9 ~- ^% C
- Database=Your_Database_Name_Here I- ^0 m/ N' h8 _4 }
- Hostname=The_PC_the_MySQL-Server_is_on
$ ?6 d; D G$ a. x - User_name=User_name_on_the_MySQL-Server) t5 `: p2 D( G( @3 \8 O' m! [$ ]: G3 ~
- Password=Password_to_go_with_above_user_name
. q$ g( ^ z5 `- W; k. V - GetDriverFunc=getSQLDriverMYSQL
% Z& I% h5 S- q, J - VendorLib=path_pointing_at_your_mysql_vendor_lib- X+ b' ?* [/ z& R
- LibraryName=path_to_libsqlmy_libary
; ~" }: A) g% P# Q! J - Active=16 C$ b/ w- k! u, B3 o
- ---cut here---
: @; X$ z( Q. ` - In my environment (a linux box with a MySQL server running locally) I have:, j$ B/ E$ L/ Y. j
- ---example---( S8 B& s( `* K' f, c( O9 {7 ~
- [DBEXPRESS] g. j; k @" r5 c
- sqldir=mysql_sql q& r5 K6 J& l7 A, O3 _
- Drivername=mysql! C9 J& w/ l- L9 Q
- Database=test
5 V- }/ d; L/ p. R - Hostname=localhost
/ K K' H5 X. y1 A - User_name=testuser' m. E: U9 z0 J, a
- Password=my_password0 ]2 n5 \: o! _# T- }7 G I7 U
- GetDriverFunc=getSQLDriverMYSQL5 G4 ^2 ~; c, m" _
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.00 f& H) h( l2 F# [3 h' a
- LibraryName=./libsqlmy.so
6 b; @. t+ Y2 ]( m4 l - Active=1
& @0 N. l: j% ^# H/ p - ---example---. A) P' ?- c8 G/ i$ d: Y
- 2 F. Y, S0 i( Y% O. X I
- On a windows box, also running the MySQL server locally, it would be:
' q6 h1 ~+ Q+ y8 H \5 d - ---example---9 D [7 k8 x2 ]. g8 J
- [DBEXPRESS]5 e+ n0 A3 O' w+ f0 b, @* n, l1 L# ~
- sqldir=mysql_sql
( n! w& p, ^1 r- y& a; f - Drivername=mysql5 R, j$ |+ b5 ?' o e
- Database=test. P" O$ G! p0 P
- Hostname=127.0.0.1) K7 s+ Q* R; ~# O3 M; X
- User_name=testuser; L& a* M1 V6 |
- Password=my_password& n) X! x0 K- D6 m$ ~/ i4 a
- GetDriverFunc=getSQLDriverMYSQL
! m0 w1 \6 j5 D% | - VendorLib=libmysql.dll1 i* O, e' w8 t" m
- LibraryName=dbexpmysql.dll) T0 U& g ~' A: c+ S+ O
- Active=1
+ `! \1 n( W3 l/ | ?+ x! C( V - ---example----
& ?" u# v" }" p; c; y& _; v - - written 02.03.04 by pwk.linuxfan
) |: _ L; d/ s1 U% f - $ r* E O/ w7 ^
复制代码 |
|