|
|
麻烦翻译一下,下面这段文章:xhan ! L, I3 S6 P9 i7 T
# L' l) ^0 j/ \+ @
-
l" X! m3 J" b# B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######' c: l- w# `& B
$ s% z; J6 I" f4 O- Z5 D2 s6 ~- ### What we need ###
! K, Z8 H! B0 C6 } - Naturally, we will need a MySQL server to store the data for us, this document 3 B+ ^" f& }* [1 I1 h b
- will not explain how this can be done - there are documents out there for the 5 A/ B- k' }5 I3 i6 p1 O
- interested. The requirements include a (empty) database for TeamSpeak to use6 \. r$ M5 Z: e7 D9 u5 Q
- and a user account (username + password) that has the permissions to do stuff9 }& T* I; _/ @. x" o, b H
- with the database. Additionally, you will need a vendor library installed on the( @- O, F) f+ u3 y
- local machine, this came with my MySQL install.
1 ~5 l% V% l, {3 G* Q, ~' n2 J$ h - These instructions will not tell you how you might transfer your data from the
' K1 A- _- c6 ]! C, p - SQLite database to the MySQL database, we start with a clean and empty MySQL2 P. q/ Z2 {2 |8 X% J. m5 O
- database.3 v; e/ W. Z* O. C1 K8 T
- Some users have reported ways to import a SQLite database into MySQL, but at
% P2 i0 Y! C7 g( t' M: s - the time of writing, there are still too many issues - check the current status) U) w+ E- k* O5 C
- in the TeamSpeak forums if you are interested.# t7 |; I. l! I! d% O9 D5 F
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ g: V) Q( F. } - Borland was used. This driver can only interface with the client library that
2 n9 v# X- g. J/ a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) u0 c* Z( r) F4 E: P
- client library - basically all you have to do is to use a 3.x client library as ( U: q2 }( |' s' G% h+ U7 ~
- "VendorLib" and a 4.x database to connect to.- Y) P# j0 h: G: N4 f' b$ t4 J. W
- If you need more info about dbExpress, you can contact Borland.3 n4 P& h0 ~! o
- ( `8 e" D* ]0 {# L8 I
- ### Doing the work ###
6 W( d5 b9 E: z - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. _* c$ G6 h L6 J - the perquisites right, just open your server.ini file, and add this section at7 g# }6 P( P; @0 J
- the end:: u" z% s( K3 N# Q" H6 O
- ---cut here---
/ K% V0 O- |: U6 N. U( { ?( a - [DBEXPRESS]' r: e4 V; f& e6 q5 Q+ i
- sqldir=mysql_sql
% N9 H' j+ A0 n - Drivername=mysql
# x5 [( I Q, E0 T - Database=Your_Database_Name_Here
% _' x: {2 W/ V( X - Hostname=The_PC_the_MySQL-Server_is_on5 C: J7 ^5 r' ^; K& A5 X. k- |; Y: y
- User_name=User_name_on_the_MySQL-Server5 ]8 O( t* _" d8 ]0 ^0 h
- Password=Password_to_go_with_above_user_name
5 D+ M$ c* X; h& D; Y) t: x3 i. A3 x+ U - GetDriverFunc=getSQLDriverMYSQL
, e6 Q+ Q! q4 c2 A) i5 N - VendorLib=path_pointing_at_your_mysql_vendor_lib
& V0 e8 _$ A% Q' t - LibraryName=path_to_libsqlmy_libary5 T: J! @, V* B7 ^4 e
- Active=1 g3 i- `6 Z) y- d# I
- ---cut here--- H9 d; p1 [ Q! M
- In my environment (a linux box with a MySQL server running locally) I have: ]! D' R$ N- J. h% H) \$ t
- ---example---
' ^! N( U8 w. }8 M( g1 q2 h5 k - [DBEXPRESS]
5 ]5 d8 G& O+ L, i - sqldir=mysql_sql
C, a% A2 A" p+ g6 I% A - Drivername=mysql
, H. q) o1 U9 k; L' e2 ^ - Database=test( N) }: Z; K; Z7 L. P6 h
- Hostname=localhost
: Q/ l- [2 ?% F/ p7 `; A- U - User_name=testuser0 r) O D3 ^- [, ?3 O `* A
- Password=my_password
* D2 c2 n/ `' W$ l1 Q9 k - GetDriverFunc=getSQLDriverMYSQL
" Q" R* k; J9 B6 U3 |! s# \ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; k# K) ~3 k$ ?
- LibraryName=./libsqlmy.so2 D/ k4 n% \! o7 I
- Active=1 {# G& `/ W0 V
- ---example---
8 }7 n Z# X) J' `* {
$ }4 {: ]: R# F- On a windows box, also running the MySQL server locally, it would be:/ @* Z1 f; I* d: H
- ---example---
+ y. \4 q5 s' c9 X0 | - [DBEXPRESS]
) P% p8 p) E% K) Q - sqldir=mysql_sql
) c4 |. Y$ n$ t& ]5 ` Q - Drivername=mysql) x+ D( a" b& @! y' q. ^% `5 V5 r
- Database=test9 s: k$ e/ l- G. ^ b' E0 t
- Hostname=127.0.0.1
X- `8 f& n8 P: d# \# g7 r, w - User_name=testuser
$ v% t. ]* I: w - Password=my_password4 n7 p: e+ ~" @; w: G/ P8 N }1 _
- GetDriverFunc=getSQLDriverMYSQL
6 j0 D% M8 d0 \ - VendorLib=libmysql.dll% Z2 n G- E5 h) y4 O4 @" F
- LibraryName=dbexpmysql.dll
0 {3 b* t2 V; \! @) y, r - Active=1# v" f5 @* T3 r) J
- ---example----& `: P0 Z, ^3 D5 h1 e, c0 T
- - written 02.03.04 by pwk.linuxfan( u( f9 k: c4 E X
2 N+ M* ]& v% O5 C: q
复制代码 |
|