|
|
麻烦翻译一下,下面这段文章:xhan
6 m# z) a+ `- \: t; n# J+ L3 g, r7 [, O# o6 u$ K# x' [
- 9 y) S/ z+ p0 f; M( F1 Y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 M2 T0 X: J9 \, q. i/ k
9 m0 X- {" A9 u& a, H. C0 a- ### What we need ###
/ B0 X, }6 S9 O% e. A7 i9 c. _ - Naturally, we will need a MySQL server to store the data for us, this document
$ Y, T# ~# z4 v; H& B; D+ S - will not explain how this can be done - there are documents out there for the 1 w: v6 H( r+ F2 p; ^8 |, k/ C
- interested. The requirements include a (empty) database for TeamSpeak to use; D6 p3 `1 K! h' e. H8 Y- z
- and a user account (username + password) that has the permissions to do stuff3 ^$ t! L' g5 R M# q% H1 F8 L
- with the database. Additionally, you will need a vendor library installed on the2 U' u; H7 e9 A' @
- local machine, this came with my MySQL install.
; ]0 \' G: s) k7 o - These instructions will not tell you how you might transfer your data from the9 v# R+ i. l1 n& U, \
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" }: Z; |, _0 @# D3 _6 ~ - database.
3 N, ?. @" |1 f6 J" W3 Y" S - Some users have reported ways to import a SQLite database into MySQL, but at% P9 J- ~* r) j* ~( `
- the time of writing, there are still too many issues - check the current status+ H e: k1 [" a0 u" a
- in the TeamSpeak forums if you are interested.
9 ]; i7 ]3 h' L8 c - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. d" e/ z" ]- b% `& d/ E4 w
- Borland was used. This driver can only interface with the client library that 2 B) T$ }3 S' [; Q5 a# K
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ ~+ |% Q5 |$ o# x - client library - basically all you have to do is to use a 3.x client library as
1 B: N S+ L' A d; F& z) U$ ?2 l - "VendorLib" and a 4.x database to connect to.' A. k2 l/ |! S& e- w" x8 s
- If you need more info about dbExpress, you can contact Borland.7 R3 l: z+ a% i; B/ [
- 5 D3 C, ~) K6 ]# V$ j
- ### Doing the work ###
& X. Y V; V# Z; c0 N) P6 A4 a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all! t, E# m$ l- t2 Y
- the perquisites right, just open your server.ini file, and add this section at7 a6 j* x: T! I. {1 y
- the end:
* g/ M! w" L; X6 V1 Z! ?4 q - ---cut here---
# C+ D0 v& Z6 X2 p G, q - [DBEXPRESS]
: s6 `! W2 p3 ?+ U9 l - sqldir=mysql_sql
[& \ i d) |7 d. n - Drivername=mysql
# z' A S7 O" d5 M6 O - Database=Your_Database_Name_Here
) q1 _, \+ l1 A3 K - Hostname=The_PC_the_MySQL-Server_is_on
; w) Z2 d- [; j - User_name=User_name_on_the_MySQL-Server/ v% s( v' R9 _% Q4 l2 A
- Password=Password_to_go_with_above_user_name( n$ r+ Z6 i! l
- GetDriverFunc=getSQLDriverMYSQL
2 G- ^& X3 j" U& S% Q' w - VendorLib=path_pointing_at_your_mysql_vendor_lib
; H- a2 e7 l6 K! Q% @: q& }5 o - LibraryName=path_to_libsqlmy_libary M* a/ t _9 c0 h/ d
- Active=1
9 G. P# S8 `0 _. E* A3 J - ---cut here---& U$ s7 y8 q2 s( r6 k5 ` |
- In my environment (a linux box with a MySQL server running locally) I have:
4 x% U7 @, e3 R! r3 Z: ~* H& Q - ---example---8 b9 @, e6 \0 \# d, \6 r2 ^; V5 _- _
- [DBEXPRESS]7 a8 f: m% B3 [ {1 \
- sqldir=mysql_sql. C8 h% H4 ]* y& i+ P; F1 Q5 w4 z
- Drivername=mysql% k3 X+ R, J' X) ~9 V& c. F
- Database=test# ~6 R6 M) l8 u' u
- Hostname=localhost9 p" j6 v7 u! B! z( n- U/ d
- User_name=testuser; v# P' d4 c, ~( t
- Password=my_password7 N" z. g1 i6 M% E$ e, R9 H
- GetDriverFunc=getSQLDriverMYSQL/ Z3 V& |& e/ D+ r
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 s: S- M) _4 X: X, V+ f3 G& h - LibraryName=./libsqlmy.so
) ^5 x6 Z: n. ^8 J, e5 a, L h - Active=13 t3 L* Y) N4 }
- ---example---/ i9 H* S* Z6 X5 S7 A* t
- . h% F: @* R/ a+ ^$ y0 n5 E" Q
- On a windows box, also running the MySQL server locally, it would be:
) f/ |% Z1 q3 S4 c) g - ---example---4 S0 S* _! Y# G; Y4 H# Z& ~
- [DBEXPRESS]
0 M6 h$ J3 Y" k - sqldir=mysql_sql% I2 X$ O; ~; D, i! B
- Drivername=mysql
3 a- z4 S1 T1 h" Q4 h - Database=test
6 p' Y5 m5 c% {4 @9 `4 z# S - Hostname=127.0.0.17 T6 p7 B- C7 y
- User_name=testuser; }4 J$ u6 ?$ Z6 y9 ]
- Password=my_password
- y- c9 @2 d% g# y2 } - GetDriverFunc=getSQLDriverMYSQL
4 Q6 z9 n' ?; F - VendorLib=libmysql.dll6 |( { [4 z: B5 ]. G; N+ J* N/ g% b
- LibraryName=dbexpmysql.dll
: ~* h% C/ @6 Q- p - Active=1
2 q9 s3 C1 R" ?4 p O1 x - ---example----2 a- B( V0 l U* r
- - written 02.03.04 by pwk.linuxfan
, n) g* Y' o. A1 H; Q - 2 s: C2 T- Q8 a! d! b
复制代码 |
|