|
|
麻烦翻译一下,下面这段文章:xhan * I$ G* g, P. ]6 F0 k/ X, w
! {- E. `9 m+ a: D8 H: J* F* o8 P-
8 A* b1 R0 z$ ]" o8 Y0 c. Q8 \ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# X- k7 t* i. y9 A6 u0 \ ~
: P p) e$ S5 @: ~- ### What we need ###7 z, O/ A8 h; L" Z9 U
- Naturally, we will need a MySQL server to store the data for us, this document
5 @" B% s) D! @; [ - will not explain how this can be done - there are documents out there for the
/ _' v# M m2 E - interested. The requirements include a (empty) database for TeamSpeak to use5 i8 r% Q* |( R& [7 t
- and a user account (username + password) that has the permissions to do stuff9 A0 E E4 F q6 v3 B3 R% M+ X
- with the database. Additionally, you will need a vendor library installed on the
& C: F- e6 `! x0 w5 i+ O - local machine, this came with my MySQL install.
9 p# X0 g* R' N% O. G# D - These instructions will not tell you how you might transfer your data from the- j# y, R9 K) b; F
- SQLite database to the MySQL database, we start with a clean and empty MySQL% @& r/ G* D; A# @3 ~9 b; `
- database.* O. c, V9 L$ N2 k- X1 N" p
- Some users have reported ways to import a SQLite database into MySQL, but at$ M7 f% E# x0 I; M
- the time of writing, there are still too many issues - check the current status
' ^, Q9 F; o2 e9 R" J' ^' [! ` - in the TeamSpeak forums if you are interested.
- O5 q$ l, N7 e9 P( p. U - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 P. U9 ^# U! b3 h1 U5 i Y; i - Borland was used. This driver can only interface with the client library that
8 j4 f) E6 T7 u" P8 l$ v - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 q) N7 \" F( {4 C0 \( D* p
- client library - basically all you have to do is to use a 3.x client library as
. M& l1 P& z9 a, Y - "VendorLib" and a 4.x database to connect to." h1 K5 l+ ]: P7 w( p, \
- If you need more info about dbExpress, you can contact Borland.8 D& ?8 m! {. A3 l- X9 T
, Z ]* j r5 b/ q- ### Doing the work ###
3 C+ S- w: V6 `; p& ^( @ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all% F0 f# G% O( o8 i, A
- the perquisites right, just open your server.ini file, and add this section at) f8 h! T) N2 w5 c
- the end:
3 F6 ~7 o6 P6 h- J4 r y+ J - ---cut here---
5 n8 ]; l) w" U1 t5 T0 R+ B7 C - [DBEXPRESS]
$ G5 c4 R/ _) G, N5 N - sqldir=mysql_sql- a7 G6 s& B$ b3 ]1 T7 E
- Drivername=mysql) w* x, F8 j8 l7 y% r R, T! _8 h
- Database=Your_Database_Name_Here8 ^( q9 e* u' a( E; @
- Hostname=The_PC_the_MySQL-Server_is_on
X; m% z5 U8 t. \* t3 f; L3 i7 Z - User_name=User_name_on_the_MySQL-Server* [* ]9 X' y1 f% I9 u4 h
- Password=Password_to_go_with_above_user_name
# }0 W7 A" m! A8 L. l7 { - GetDriverFunc=getSQLDriverMYSQL
7 j/ }/ _' |: F& D6 b8 {6 c2 H6 B - VendorLib=path_pointing_at_your_mysql_vendor_lib$ |5 t2 j* h) F
- LibraryName=path_to_libsqlmy_libary1 k( g0 Q1 a0 \. v2 D
- Active=1
7 u/ _$ a( V; }% {% z0 m - ---cut here---
. ?3 Z" \0 ~! h! b2 g6 ]7 d( K - In my environment (a linux box with a MySQL server running locally) I have:3 r6 F1 d' I' _1 m
- ---example---
* h3 X+ v( h3 y: t r - [DBEXPRESS]9 W& I3 n" n; |- O
- sqldir=mysql_sql
/ i1 h6 e" J# \% M+ M- @; T - Drivername=mysql6 C: ~$ M1 @/ t0 z
- Database=test
5 [0 F5 ~1 Q8 z# v9 M3 e% j - Hostname=localhost$ R; ]- h1 `3 M& E* g1 }
- User_name=testuser
% O3 X9 X8 v. N/ S9 z - Password=my_password
8 |) [* t* d: W1 L$ m: x6 I - GetDriverFunc=getSQLDriverMYSQL
3 e! i/ u h% v+ G4 ~& E - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( m% N: Z) L% E. V; [ - LibraryName=./libsqlmy.so
3 X% K0 G/ a4 j) E+ D6 A - Active=1
$ d# m# }4 C. [- E1 M; d - ---example---2 O( N2 P6 B4 P- |& O: |8 k W8 I, _
- 6 j8 r# g2 r- `2 U+ w+ e
- On a windows box, also running the MySQL server locally, it would be:
' `: a7 L0 C: A2 r, C. g2 [" ? S. g - ---example---
& W$ C: a+ v- o8 K: W - [DBEXPRESS]1 |8 f# }% K \: o( J, R6 r
- sqldir=mysql_sql
) {2 C: J* E5 _" A y) w8 j! V - Drivername=mysql- X- P& ^$ p4 R
- Database=test" k+ q8 W) f/ @5 b' j# U9 P
- Hostname=127.0.0.1+ {5 q& m6 q- G v9 D
- User_name=testuser4 k$ l3 v8 |; q; D |1 k- W
- Password=my_password
# ^( r# }* x% N& v - GetDriverFunc=getSQLDriverMYSQL
6 L1 X9 ]& C% c& K8 A' {, S! @* e0 [ - VendorLib=libmysql.dll. x/ B# }+ A# l
- LibraryName=dbexpmysql.dll
, w2 B/ [6 N2 e7 V$ }5 } - Active=1( \/ r ^0 Q- P- [# j
- ---example----' D" D: O0 {, |0 O1 W- Z3 X
- - written 02.03.04 by pwk.linuxfan! e0 f; B+ C \' `+ f/ @
- 6 r- ?' n( b+ W, ^* Q' P2 K
复制代码 |
|