|
麻烦翻译一下,下面这段文章:xhan
, X! f, o& g- v
# _ b9 n: S7 c! N E; {-
4 F' Y+ I( X: f- s" f3 y - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 x2 c4 k; e. |9 a% k
- ! D5 g- p/ B( P: X7 K# W
- ### What we need ###
% L, l5 H$ r4 N - Naturally, we will need a MySQL server to store the data for us, this document
2 y( I7 |$ k2 g' T# E" _( O( n1 p - will not explain how this can be done - there are documents out there for the $ N2 N9 p3 B! V9 y! {& U
- interested. The requirements include a (empty) database for TeamSpeak to use$ |3 } x3 A( N% I+ ?, {6 g0 N
- and a user account (username + password) that has the permissions to do stuff
- e5 R/ d, `9 x! w - with the database. Additionally, you will need a vendor library installed on the
0 {( Y0 C- B2 c9 a3 B5 U2 a/ `3 d - local machine, this came with my MySQL install.
9 @8 ?4 e) a* N0 H - These instructions will not tell you how you might transfer your data from the
$ v" ~/ X% C$ a# a! p! { - SQLite database to the MySQL database, we start with a clean and empty MySQL; z; Q5 @ B+ w* G4 O6 F1 r
- database.1 m: U4 i/ l7 S# p' _7 Q& P
- Some users have reported ways to import a SQLite database into MySQL, but at
% k- \7 ?6 J* H. J9 h; b; _9 H& c - the time of writing, there are still too many issues - check the current status' i- z4 w+ B+ F6 s! I
- in the TeamSpeak forums if you are interested.% q1 X7 Y% v( Z5 P
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ H" h5 p3 o6 `# H - Borland was used. This driver can only interface with the client library that ! b6 M8 Y. U5 n* N/ C* w. a
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 E! {. U* r/ D7 K
- client library - basically all you have to do is to use a 3.x client library as
3 a3 D8 S5 c+ U0 t. G - "VendorLib" and a 4.x database to connect to./ \5 E# C4 e1 t1 m: N1 m& @4 H
- If you need more info about dbExpress, you can contact Borland.
g8 B+ x" t9 [9 {% o - & L7 Z) b1 b- I& O5 x# t
- ### Doing the work ###
5 c) S+ _5 S! [% F- a& r- u - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* N# q. Q% r2 U, R4 }2 S* W
- the perquisites right, just open your server.ini file, and add this section at
( N. w. y# |9 [/ g$ T' y - the end:* C$ d; P o- D- X2 K
- ---cut here---; W' z5 w- I8 d8 B: ?' V
- [DBEXPRESS]
: I+ d0 x( U) ^ - sqldir=mysql_sql/ j0 g8 ^( ^& P w6 M! Z# A
- Drivername=mysql5 T, e- W* C3 u1 L6 P* a" q4 F
- Database=Your_Database_Name_Here
- B7 l. W: e) \+ g0 g# J - Hostname=The_PC_the_MySQL-Server_is_on k( p& V; C# h2 `
- User_name=User_name_on_the_MySQL-Server: i2 E* Y$ h% N( `# _% T
- Password=Password_to_go_with_above_user_name
! Z: c. k" M4 o3 } - GetDriverFunc=getSQLDriverMYSQL
8 }5 w6 ^4 F0 M; m( I0 f. g - VendorLib=path_pointing_at_your_mysql_vendor_lib5 G* w) d! t5 }4 o! V# @
- LibraryName=path_to_libsqlmy_libary
: J# {7 E. h- S - Active=1
* Q4 J1 n* ?: o- F3 ]! b - ---cut here---6 v% H" o- v: l5 {' k/ W9 a
- In my environment (a linux box with a MySQL server running locally) I have:, d! s$ t7 ^' ]9 }' {1 J
- ---example---. ?* S) p$ r5 v' p: P) S5 l6 p
- [DBEXPRESS]3 {6 p8 _9 p' a4 I: ~+ V
- sqldir=mysql_sql( M2 e# N8 {! X7 Y- x
- Drivername=mysql
8 J3 {' t! j# W9 o1 V - Database=test% y0 C/ R* ]+ A& ^
- Hostname=localhost# E. O+ y9 l6 p9 g" i8 }
- User_name=testuser
8 L e& f l+ ^2 k: p - Password=my_password
* [, ]8 ]. `/ J' V, y - GetDriverFunc=getSQLDriverMYSQL3 f3 P9 a; l' p1 W. U# o
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; ]/ k+ v/ m" [ - LibraryName=./libsqlmy.so
& X7 M9 v+ S" B0 B% s1 M) ^5 \& A - Active=1! ?( f, M, S* s
- ---example---
2 ^3 Q' m5 `' r& f: h - 7 u) J# Q; R3 i, k3 n: T. q
- On a windows box, also running the MySQL server locally, it would be:
2 W! U: H `8 ~" { - ---example---; ~/ _- R- D$ L6 N2 M
- [DBEXPRESS]
5 T [! s& J; t) k - sqldir=mysql_sql q2 S3 k* `2 l2 I: [; d
- Drivername=mysql
, A% b+ Y# }' N5 m - Database=test8 l9 l% H5 d/ A8 z
- Hostname=127.0.0.1
3 |0 o+ ~) R0 G' L1 `% Q! y+ o" U; O - User_name=testuser
' J s. i- r2 C0 [, F - Password=my_password
( h: n+ e" P3 f$ y8 J# h; ?! \4 R - GetDriverFunc=getSQLDriverMYSQL6 o9 r1 N1 T/ V2 A5 o1 ~* I
- VendorLib=libmysql.dll
5 {- u3 K! @5 m4 S6 u8 A7 R - LibraryName=dbexpmysql.dll) \, l8 ]' x9 }& n) n+ Y; F
- Active=1
R7 U- i8 z, ^( w* S' y) H A! {6 o - ---example----
/ d7 E& |$ j2 l$ J* h& _ - - written 02.03.04 by pwk.linuxfan2 E) ~8 t" R& J; `; m! a) J
- % @$ _6 [" j7 z) C# ]; _* _- _* i# w
复制代码 |
|