|
|
麻烦翻译一下,下面这段文章:xhan % |3 ]8 X, B0 q* k
1 w# l$ v" {) x/ `) y
-
" E! A& I9 {" f% j - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( \* L5 K3 l! o* D' m
- ( X# M% C6 P" o8 ^) V
- ### What we need ###0 s D6 F0 X% ` s7 y* S
- Naturally, we will need a MySQL server to store the data for us, this document & h3 ?# h* z. I, x& _
- will not explain how this can be done - there are documents out there for the
1 y: }, `7 Y- {* S% f0 B- y - interested. The requirements include a (empty) database for TeamSpeak to use _& c* {* ^8 Z5 Y
- and a user account (username + password) that has the permissions to do stuff7 b) ]& t! k. S7 X7 F
- with the database. Additionally, you will need a vendor library installed on the! h q8 x0 C) S1 o/ f# \: N
- local machine, this came with my MySQL install.$ G! _# v+ _- K" J9 t$ Z1 q/ U Q# |: q8 R. |
- These instructions will not tell you how you might transfer your data from the
8 v& E; W" u9 N+ J) P+ T - SQLite database to the MySQL database, we start with a clean and empty MySQL
/ f* [% t9 A1 L( r) e/ h - database.
8 x7 R1 u, H5 g4 C9 t. ]5 Z/ | - Some users have reported ways to import a SQLite database into MySQL, but at
" F H# E- ~/ V% Y0 K' j y& D - the time of writing, there are still too many issues - check the current status
. m7 C$ x$ E, A! x' L9 T% _ - in the TeamSpeak forums if you are interested.' z* Q" D0 A$ ]; b1 ^7 S* J8 I
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 C6 J, @+ ^( X9 u, n! z! m
- Borland was used. This driver can only interface with the client library that
; o4 Y! \! z+ \9 { - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# r7 ~" R% A/ i6 `8 h
- client library - basically all you have to do is to use a 3.x client library as $ T7 X) `7 j& r+ Q; i7 ~+ w6 V
- "VendorLib" and a 4.x database to connect to.
6 i3 Y8 _3 {" K# E - If you need more info about dbExpress, you can contact Borland.
& @ }' w( f. e8 X# N+ j
" [3 b8 f" k, Y- ### Doing the work ###0 n% _6 b ^" O4 @8 J: Y
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' J* A) z+ b- } u* J - the perquisites right, just open your server.ini file, and add this section at
$ R0 @+ e; P, z" A; ?" C. q - the end:2 v% ]+ N2 u+ K# D/ {; |( W
- ---cut here---7 v+ o4 Y O& H+ v7 F
- [DBEXPRESS]
) e p( R6 e- R - sqldir=mysql_sql
5 _/ a# {( M# b - Drivername=mysql
" Z1 s/ a7 N2 E& W w - Database=Your_Database_Name_Here
% ]" C/ x! N; Y$ j$ h - Hostname=The_PC_the_MySQL-Server_is_on9 k- H! y" ?7 R# {6 I* j8 B
- User_name=User_name_on_the_MySQL-Server3 `' }* K2 i: x7 ]3 H# m' h5 x; b
- Password=Password_to_go_with_above_user_name
0 Y0 D- r0 a, q* R5 y* s - GetDriverFunc=getSQLDriverMYSQL1 U/ Q" A% B8 h C1 L& W1 z, {* d
- VendorLib=path_pointing_at_your_mysql_vendor_lib! E4 D: l; }( A/ q
- LibraryName=path_to_libsqlmy_libary3 V7 C% y/ [ S% k1 v' C3 r
- Active=1
7 [7 B/ V1 R x' h( f% ] - ---cut here---( k0 O {$ |) W0 \( B! \5 J
- In my environment (a linux box with a MySQL server running locally) I have:
4 A( e2 `; I* \! E# B2 d - ---example---
- m& E; V9 |' C% l - [DBEXPRESS] z, T7 {1 I7 B! V$ D' `, O
- sqldir=mysql_sql
1 B) Y& L# v1 B/ `' s# }7 z2 c& t - Drivername=mysql- J' H, [" \8 u9 A! w. i5 P
- Database=test+ w/ P7 f7 I! `" h n
- Hostname=localhost
; f4 p4 G' X' `& G5 D - User_name=testuser
: p/ ]$ z; h9 q! \6 m; N) G - Password=my_password' q7 f8 }8 l% N* f* v
- GetDriverFunc=getSQLDriverMYSQL
2 M! G4 P3 N- H9 F @: u - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* G3 |7 J" B, R1 V' |* @ - LibraryName=./libsqlmy.so
( T, e6 O( h6 Y9 v' ? - Active=1
: e# l L3 i# Y6 r8 D - ---example---% j8 @/ A2 C( r6 y7 |
- 5 a& [8 U0 h# R: I& T
- On a windows box, also running the MySQL server locally, it would be:
4 W. ]% Z; m- [3 q9 L3 j6 f ` - ---example---
4 P) m, B( x) [6 r( h9 W) I - [DBEXPRESS]/ M. y3 \7 L& }9 a, q7 H/ j
- sqldir=mysql_sql/ i3 j5 p3 I5 ~! w4 e# w
- Drivername=mysql
" a/ o* C$ h7 o( Y - Database=test5 P+ j8 ^. ^! d- U2 ^- X
- Hostname=127.0.0.1
5 Y$ R2 W! |* m9 X) i - User_name=testuser
. X. k" P# D) b; P9 M, M7 a - Password=my_password [0 W) Z! C, j
- GetDriverFunc=getSQLDriverMYSQL# |1 Q7 z5 F1 S, K: h7 W
- VendorLib=libmysql.dll
) x9 P3 {. S3 j5 K4 C - LibraryName=dbexpmysql.dll
3 a' \1 s$ g9 I1 q2 m" o, w# r H - Active=1+ M- ` G; K& l2 {# @9 K
- ---example----
3 A1 g( Y3 v5 a ] - - written 02.03.04 by pwk.linuxfan
/ ~) X0 i1 j$ [8 B8 e* @% P - # |0 Z. d) p* S5 W
复制代码 |
|