|
|
麻烦翻译一下,下面这段文章:xhan
) R! Y8 f- ]) p8 I* v
# f3 [- ~; v, t; q }- / l* g8 }0 z6 }# [ ]+ S. n9 V$ }1 D
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& H7 h" P( A( X4 s, Y% H
- 5 I( H: O* p" U, G" f; k1 y
- ### What we need ###
5 y5 V4 W J8 _% u1 m9 q/ a - Naturally, we will need a MySQL server to store the data for us, this document
/ Q( t# J. L# x3 z! c - will not explain how this can be done - there are documents out there for the
; ~# Q: `, _9 N( J7 ? - interested. The requirements include a (empty) database for TeamSpeak to use
( H" V4 {+ a) y2 C" ~/ `. V" M - and a user account (username + password) that has the permissions to do stuff# z/ r; t6 M2 @& R% q* }
- with the database. Additionally, you will need a vendor library installed on the
( S4 ?$ F) }' K3 t( H w( W3 M - local machine, this came with my MySQL install.% R4 c L5 j w8 B$ M' E
- These instructions will not tell you how you might transfer your data from the# e8 W# d8 I @$ T5 q
- SQLite database to the MySQL database, we start with a clean and empty MySQL& X* v4 C9 R5 D; l8 g
- database.' t7 {+ S" x2 D) o0 w
- Some users have reported ways to import a SQLite database into MySQL, but at, z. I) f9 T! a
- the time of writing, there are still too many issues - check the current status
. |; A _: s0 O' o& L; `& y - in the TeamSpeak forums if you are interested.* H0 I- s o: h& M! l5 f
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 q7 h0 X5 S0 I( T" m9 [ - Borland was used. This driver can only interface with the client library that
" F9 f' {* B" C- `/ J# K - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! V, C1 s/ A* g0 I- x1 `
- client library - basically all you have to do is to use a 3.x client library as
; b2 _5 x8 f& ?; N( ~* p) U - "VendorLib" and a 4.x database to connect to.
9 [4 E6 S6 S) U) m - If you need more info about dbExpress, you can contact Borland.( k, ^4 I. K" o z; ]9 H. L
- 5 h' Z4 ^" I) |- l
- ### Doing the work ###
" X p+ W* \. z* f - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: k0 g6 g" S9 h, j! b% @ - the perquisites right, just open your server.ini file, and add this section at
: P1 B" c1 D& J2 C" P# o - the end:$ E1 E* n1 e0 c
- ---cut here---& ~: D1 ^6 D6 m* r8 O5 j# o( J
- [DBEXPRESS]& g7 G& ]( W- I
- sqldir=mysql_sql3 K7 {2 l, \8 s+ A" u
- Drivername=mysql
, t8 R% d* L+ {# |; t6 S$ W - Database=Your_Database_Name_Here! I7 \( H( q+ y4 `: ~. @
- Hostname=The_PC_the_MySQL-Server_is_on
# \% m( ?% A4 E3 L" _' I - User_name=User_name_on_the_MySQL-Server* _' y9 l S9 Z
- Password=Password_to_go_with_above_user_name
. C* U6 ?$ ~8 R: b. U8 e9 D# G - GetDriverFunc=getSQLDriverMYSQL0 c7 f* y% T, f+ F1 f
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. q+ I, t4 d8 l" j: p* u' H3 v - LibraryName=path_to_libsqlmy_libary
( t( _6 N+ t) M6 n+ \6 N - Active=17 z1 ^. {; Y& {" |8 h+ n7 t
- ---cut here---! q9 w' Z; G7 O k9 Y0 W* ~! e
- In my environment (a linux box with a MySQL server running locally) I have:
, |; P/ w5 Q: \ z! W, W - ---example---$ Z% ~4 ^7 C* Q6 ? V; f
- [DBEXPRESS]$ b1 ^% `( s! U9 u) ?4 e9 }
- sqldir=mysql_sql
: t, K* d F2 `1 m- P - Drivername=mysql+ ?/ e, Y: q/ X
- Database=test5 e! `% _* j( E" c6 F# M# k
- Hostname=localhost) @; \1 K& W7 O( ~* x- h* p
- User_name=testuser% Z+ |9 Y" b% X3 v. e4 k+ a
- Password=my_password
. ~8 d Z5 t* p. { - GetDriverFunc=getSQLDriverMYSQL5 I& y8 h5 K. X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 {% z% n6 v0 _! Z; B3 R7 R: W6 a3 m - LibraryName=./libsqlmy.so
* o! X N X. G& \ r8 B - Active=1' q& t7 y3 b8 `
- ---example---
, [* _4 U/ H. \; h m! k9 B3 g
) D1 v0 ]2 I7 P5 L) {% u- On a windows box, also running the MySQL server locally, it would be:
& [/ S k6 }8 @7 R: D - ---example---
2 n* u) M& |9 @/ E! i" R8 V+ j - [DBEXPRESS]& `9 z1 C8 |$ w: Q s9 m
- sqldir=mysql_sql3 G) l# s3 D! ~) K o
- Drivername=mysql& {7 m4 h# K/ U, n6 r9 x
- Database=test3 w N2 I) ]% ~
- Hostname=127.0.0.1) P$ _: f7 A6 c% r6 C4 U
- User_name=testuser. A. O# b$ c/ N( Z, }" v+ ?$ I
- Password=my_password; C% k: ^3 J0 O4 |) Q% f# N
- GetDriverFunc=getSQLDriverMYSQL9 o6 G/ B8 m1 ~% J8 X
- VendorLib=libmysql.dll
+ U4 S& H( b/ z" } - LibraryName=dbexpmysql.dll
9 q3 O' ~5 j7 @4 a& J - Active=1( j) r" E( }4 h3 r7 T* _
- ---example----
. F* k8 {) B* }( d' g F; k* z; w - - written 02.03.04 by pwk.linuxfan X r3 b% l! f) x& w. }- V$ A0 x
9 W/ J1 b3 j! |( n$ R
复制代码 |
|