|
|
麻烦翻译一下,下面这段文章:xhan
$ z- h( A0 [/ s0 q4 A1 Y; P& ?6 i0 T9 j" C) J* L, u/ K
-
' R! f" o p. }; o) t2 T - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" ^# {" Q6 j+ `" t' T4 h, E
$ b/ d* s; ^. O* {) P- ### What we need ###/ F. X+ D$ B$ o) j r0 j! j
- Naturally, we will need a MySQL server to store the data for us, this document 5 `4 |% r$ V d# p7 p, ]
- will not explain how this can be done - there are documents out there for the " M1 p0 G3 ]/ \( b& J9 m. B
- interested. The requirements include a (empty) database for TeamSpeak to use) `/ W/ m0 n7 U5 \8 ]
- and a user account (username + password) that has the permissions to do stuff& j& g3 t$ x: y6 q; ?* C- J: R, M
- with the database. Additionally, you will need a vendor library installed on the* D) o8 H, s+ r; \4 f) A4 W
- local machine, this came with my MySQL install.
6 J* s* L4 |3 D K - These instructions will not tell you how you might transfer your data from the$ {3 N# z* \2 e: J. }1 l* D
- SQLite database to the MySQL database, we start with a clean and empty MySQL! b( r( @7 S8 y9 m. t
- database.5 B/ Q0 c* }* |+ n
- Some users have reported ways to import a SQLite database into MySQL, but at
& J- j" l' e7 q) t3 b' w - the time of writing, there are still too many issues - check the current status' e2 ]$ |8 o9 i3 n
- in the TeamSpeak forums if you are interested.
3 I, a9 F" q* D# V" y) [" I K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 N1 o9 s X! ]; L) g8 Z, r - Borland was used. This driver can only interface with the client library that
4 G9 G; h- v k& z) K& j, e+ s - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! r3 b$ f2 \- n" X" T# I2 I3 |
- client library - basically all you have to do is to use a 3.x client library as
/ C+ V2 Y1 N+ n1 | - "VendorLib" and a 4.x database to connect to.
4 k& I. e F5 y7 m! m0 x! w& ~3 Y - If you need more info about dbExpress, you can contact Borland.% R9 }, W3 g- @/ F. _1 X3 \
- $ c1 Y3 O% G: f
- ### Doing the work ###2 l1 y; {0 k0 f! J. n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* A& [& s% m+ b& ]% o1 S8 A
- the perquisites right, just open your server.ini file, and add this section at
1 n/ t) h+ J8 g- r3 h5 e - the end:
. T8 t8 f. c* a# ?9 ? - ---cut here---
$ o8 f& R5 Y( \+ H3 U - [DBEXPRESS]: k% o1 x( u8 D1 I- w: }/ R/ D
- sqldir=mysql_sql0 e, j: |$ c# J& P( @: N
- Drivername=mysql
# w; q7 M* ?4 h* `2 E5 m8 z - Database=Your_Database_Name_Here
) |# b; E4 h X' E - Hostname=The_PC_the_MySQL-Server_is_on
2 Z4 p; s7 \1 T1 \/ b. f6 O9 j - User_name=User_name_on_the_MySQL-Server# y( k/ F( O4 [6 r, N
- Password=Password_to_go_with_above_user_name
C% X# O/ y8 ~1 l3 Z, } - GetDriverFunc=getSQLDriverMYSQL
. \# [7 V% X- E. l0 J - VendorLib=path_pointing_at_your_mysql_vendor_lib
& E { o" x P2 v; E0 \ - LibraryName=path_to_libsqlmy_libary& |0 b+ w5 B$ y' H+ O
- Active=1 B3 S* F$ C3 ^0 ^& o; M! W
- ---cut here---. F1 f. S& {6 H+ ~
- In my environment (a linux box with a MySQL server running locally) I have:! q i( t% k8 }& I% J
- ---example---
8 P( J- A% J t3 \3 Q* x) u) I6 C - [DBEXPRESS]
' ]( O$ z8 |( u5 T* F* ~. N( k4 B - sqldir=mysql_sql
; K/ b X. d5 h1 L. O1 u2 q - Drivername=mysql$ F' d' ?% o) V- R) d
- Database=test
7 t* F, O4 r X3 x0 t - Hostname=localhost$ D! }( E) J7 a0 i( }- @
- User_name=testuser
3 ?2 ]# X0 x+ f - Password=my_password+ Z& U7 t# K+ v/ ~9 F
- GetDriverFunc=getSQLDriverMYSQL
( V g* @. o z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.06 U, f* E+ j0 X3 Y2 Q' a
- LibraryName=./libsqlmy.so
, X7 d. A2 [2 z5 M9 ~) g - Active=11 ~9 |/ |5 K' y K
- ---example---& Q" f9 I, O2 u4 E+ M# Z1 }) M8 _1 I
- ! Y' V7 t" w3 e$ c% ]; \
- On a windows box, also running the MySQL server locally, it would be:
/ B/ h; Z( B, f9 c - ---example---# G$ \1 z u6 O+ H* \
- [DBEXPRESS]: t3 P6 v: v& L: r: q& v
- sqldir=mysql_sql
( x& I( _- F: ]2 I. M1 D - Drivername=mysql
$ h9 ^3 {( V1 ~" z, b: w- C6 o- y3 G( q - Database=test
$ s/ Y9 o, O: P' ~, k5 Z - Hostname=127.0.0.1
& F' t9 C" i1 H - User_name=testuser
5 s- U0 Q- \8 D) o# ]: R' F0 L - Password=my_password
8 n3 ^* E7 v ? h3 p! o8 C9 T2 f - GetDriverFunc=getSQLDriverMYSQL
- _6 X+ s$ l2 Q: G& w$ C - VendorLib=libmysql.dll
+ c: {8 P2 Y S8 l7 L - LibraryName=dbexpmysql.dll1 y9 p8 v! k. W! h
- Active=1
* o" T! c& `) w9 C o& x4 B1 s8 j) L - ---example----
/ J" ^2 q) s: I$ k! ? - - written 02.03.04 by pwk.linuxfan; @3 u0 k8 ~; v6 |/ ~
# b/ Z1 }% {; x' h& P9 r
复制代码 |
|