|
|
麻烦翻译一下,下面这段文章:xhan
* `% `: F. _6 x, n, h4 ?5 |! H$ @
- ) t0 u, z r% p
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) y( J' |5 E- C/ @. \7 V: I: p
- ' l4 v/ B3 E1 H6 U) t5 c1 B# r
- ### What we need ###
, J: m: A6 @/ a6 C" |0 i - Naturally, we will need a MySQL server to store the data for us, this document
6 y! L) J# \+ K2 U, s3 | - will not explain how this can be done - there are documents out there for the
; a! V/ x9 [: |7 {; i6 o; g - interested. The requirements include a (empty) database for TeamSpeak to use
% ^1 d6 _8 q) ]6 x) ^* j - and a user account (username + password) that has the permissions to do stuff0 A8 o; y6 Y( Y5 c' I3 j! u$ K N
- with the database. Additionally, you will need a vendor library installed on the/ r1 z5 h4 a( |. z
- local machine, this came with my MySQL install.2 ]( v3 A) J1 c7 D! U, Y! A
- These instructions will not tell you how you might transfer your data from the
: Y5 I3 }# N5 D% { Y" ^ - SQLite database to the MySQL database, we start with a clean and empty MySQL- O. N' b8 d" ~0 d
- database.+ x* U/ V8 R9 }" B
- Some users have reported ways to import a SQLite database into MySQL, but at
' c& Y- B5 D" K$ \$ F8 w - the time of writing, there are still too many issues - check the current status, O; ^8 r Y, Q
- in the TeamSpeak forums if you are interested.
% f( d4 c% a3 O' ` - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
3 N; L2 r6 I( y! c7 J - Borland was used. This driver can only interface with the client library that 7 H6 r# f# Y6 d8 f/ P% }' z3 p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: y1 j5 i4 s/ t - client library - basically all you have to do is to use a 3.x client library as
9 H, W6 y. P# a; d+ N1 E7 x - "VendorLib" and a 4.x database to connect to.
# z4 z$ E" T, q - If you need more info about dbExpress, you can contact Borland.
, t0 R1 Q" \( ]2 ]
' V5 ]9 m3 ^" w6 k8 n- ### Doing the work ###
! m) S. n0 b8 a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
9 O' h. J) G. m! F% e6 j/ W# A% U - the perquisites right, just open your server.ini file, and add this section at T/ Z* B, J6 U/ e$ f
- the end:/ Z& E" ~% q! d% z
- ---cut here---
* s2 n) k" _! ?, E" Y' v# ^ - [DBEXPRESS], Q; Q% N6 C4 o! Z' O" i5 Z
- sqldir=mysql_sql7 I- T7 i/ e+ l: W
- Drivername=mysql$ V3 l/ q$ Z/ e. ?9 p
- Database=Your_Database_Name_Here/ B- L" h! W. `
- Hostname=The_PC_the_MySQL-Server_is_on
9 |% S7 t9 L- s3 r, m5 ~# i - User_name=User_name_on_the_MySQL-Server" e$ M1 |. d/ m; N
- Password=Password_to_go_with_above_user_name
+ d# n6 b4 Z; E - GetDriverFunc=getSQLDriverMYSQL
0 n e5 `1 B1 b } - VendorLib=path_pointing_at_your_mysql_vendor_lib
/ b2 K) g) d9 M+ @8 D4 D2 b' C - LibraryName=path_to_libsqlmy_libary1 o3 V) Q% u# e1 @' E' n
- Active=1
4 b& d9 m5 ]; l' _/ C d& r - ---cut here---! W! n4 W# u! m$ x; ~5 a: ]3 K
- In my environment (a linux box with a MySQL server running locally) I have:* P. i- _/ P3 y+ P0 j" L
- ---example---
6 b+ Z9 {; H4 G# ^& Z - [DBEXPRESS]4 t& k5 @. w4 J4 T
- sqldir=mysql_sql
; b+ K+ k8 Z& H4 R& n - Drivername=mysql
3 c0 O9 j( J# ^ - Database=test
8 Q8 d" j$ {: R& Z& e7 z - Hostname=localhost
3 t7 E+ N6 I7 b4 M' n/ | - User_name=testuser! x# N) m5 A* k9 z
- Password=my_password
% C* a( {3 y- r X - GetDriverFunc=getSQLDriverMYSQL
1 ~ b7 P7 p# L, k4 e5 N - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 U) |( U U0 w8 r - LibraryName=./libsqlmy.so
1 U0 a. G) z3 t0 B7 O - Active=1
: |) }% t0 \- Y% k. O8 ?; | - ---example---
5 p1 B6 S9 \: `5 P. x' R* T+ G4 z' y
$ l) u6 ]5 c# y- On a windows box, also running the MySQL server locally, it would be:
. ]/ O8 Q+ l( V6 y8 k1 H - ---example---) U* B; [+ u4 j
- [DBEXPRESS]
& r- C+ z4 ~% a - sqldir=mysql_sql
4 s$ J9 ~& n+ Z7 y; L" x - Drivername=mysql, m* x, s: i6 x0 ~2 ^! F4 m8 B
- Database=test" z$ v }0 r# L8 C, t6 p, g
- Hostname=127.0.0.1
) n2 F. _4 T1 n1 Y7 |( B - User_name=testuser
% d9 L& b" K! j. P" e0 v) e - Password=my_password
) r7 X9 Q. {; W9 v- z - GetDriverFunc=getSQLDriverMYSQL3 m1 O, W$ F" W9 K7 W7 n' |# _+ k+ X
- VendorLib=libmysql.dll
( `3 F( Y, S3 |- z - LibraryName=dbexpmysql.dll
; G0 d, L$ b$ P" ^- a - Active=1
6 l* i) c. @# F7 B: S0 f4 [ - ---example----$ q) C4 U1 x3 x
- - written 02.03.04 by pwk.linuxfan1 r) ~- e) U* Y8 e- P
; p# c/ U% p: X+ o: `
复制代码 |
|