|
|
麻烦翻译一下,下面这段文章:xhan 4 B3 I% ~/ B0 a
7 S" _ y3 C. |% S- b
-
0 Y9 z- _$ A1 l* O - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& C/ ~' {# k3 B2 ~0 Z/ m9 Z$ z
3 @9 g0 q. m0 V7 _. v! G( \* Q8 y- ### What we need ###
! ^* \: b; ` R% w5 B - Naturally, we will need a MySQL server to store the data for us, this document 9 ?3 \, \6 U) G3 h8 M3 \' J
- will not explain how this can be done - there are documents out there for the
. |& j2 X3 a9 X# P& | - interested. The requirements include a (empty) database for TeamSpeak to use
/ d6 }# F9 g6 ~' n, d& {1 d2 O - and a user account (username + password) that has the permissions to do stuff. @% H- t. E9 \$ y$ }- _+ f
- with the database. Additionally, you will need a vendor library installed on the
) L% q7 k, Z7 B& Y9 n( o2 L1 g - local machine, this came with my MySQL install.
! ?0 Z0 `. _* Y4 Z! W - These instructions will not tell you how you might transfer your data from the, `* p3 ^2 u' A, p$ y- _0 }. }& W
- SQLite database to the MySQL database, we start with a clean and empty MySQL
- f( b/ ~4 K( ^' j9 x; T7 \' l! ? - database.
8 p1 b& J" c* d7 Z1 ? - Some users have reported ways to import a SQLite database into MySQL, but at6 f. p" J& C2 l* x w+ F
- the time of writing, there are still too many issues - check the current status1 \1 y: x7 N6 J; D2 b( F
- in the TeamSpeak forums if you are interested.! h# \' L2 N( |+ `3 c
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; i3 L8 |$ c0 ?% ]$ S0 L7 B
- Borland was used. This driver can only interface with the client library that , J v8 [6 x, \$ B3 V4 [- Y6 {
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 r( C C' y8 _0 w+ V2 R1 B
- client library - basically all you have to do is to use a 3.x client library as
) ]* ?4 t1 H3 N) U& t3 I; Y1 S - "VendorLib" and a 4.x database to connect to.
; E _- F/ t+ r9 Q' a - If you need more info about dbExpress, you can contact Borland.3 u* ~/ d7 L2 [+ T4 g2 Y4 q
b, n# @9 l- P# l, e- ### Doing the work ###/ U5 L7 U' M: @
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# w2 g* ` J0 W, B - the perquisites right, just open your server.ini file, and add this section at; N& l! k- k0 M0 g
- the end:4 W& c& u' e& n$ U9 k; y" n8 g
- ---cut here---+ n1 Y2 y f9 \( X5 ?
- [DBEXPRESS]
) m8 x4 Y3 F1 g - sqldir=mysql_sql2 Q2 c2 r. Y) z: x( x+ [" R
- Drivername=mysql$ g) T E4 X) K1 \
- Database=Your_Database_Name_Here" n* _9 f {3 t& d
- Hostname=The_PC_the_MySQL-Server_is_on
! a) Y- x% \; A c8 y$ Z5 Y0 A - User_name=User_name_on_the_MySQL-Server
, |7 N: W9 O; O8 } - Password=Password_to_go_with_above_user_name. x2 h: t) z6 N5 o/ b
- GetDriverFunc=getSQLDriverMYSQL" D+ S L8 w" G( v8 U9 I# n! S2 I
- VendorLib=path_pointing_at_your_mysql_vendor_lib1 [; h) c( e) v/ @
- LibraryName=path_to_libsqlmy_libary! x& U7 E \2 F) x/ g
- Active=13 o1 j- d9 n/ c: a1 ]
- ---cut here---
, O/ Q( j! N& P$ z+ z( T% o - In my environment (a linux box with a MySQL server running locally) I have:. w3 r1 F# @' _
- ---example--- J% Z3 b* M' z: R5 A
- [DBEXPRESS] {$ [/ J$ Y1 ?! q m) z" `' [- b
- sqldir=mysql_sql
, L! E- Q& l0 p: v - Drivername=mysql& J. |& d5 H! ]( `! u Y! \$ w
- Database=test
* l; I; K& N2 l) M0 x. h: X' @) e - Hostname=localhost/ @) f8 h. ?' H: ^
- User_name=testuser, C. g* h% {+ R, K6 Y* [3 ^$ d3 A
- Password=my_password! z: B" l* N# k! P$ c7 l
- GetDriverFunc=getSQLDriverMYSQL
P8 I/ Q0 k1 @3 ], H - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 W- V8 Q. k" ~
- LibraryName=./libsqlmy.so# u7 _: {" {; ^! c+ j0 ?4 D
- Active=1
3 w+ Q% o+ r( y$ p% x4 n" }* [ - ---example---
4 v* F3 ?# t" k6 `% d. H
4 h/ v' ]7 h3 J" r2 t6 U' ~/ _8 N- On a windows box, also running the MySQL server locally, it would be:& Q5 u# @. M+ X l7 j8 w
- ---example---$ z6 ^. b+ W( U7 W
- [DBEXPRESS]
' `- a! Z" g, e5 a: g5 u - sqldir=mysql_sql
4 [8 I1 X! ?) I5 Z - Drivername=mysql
' H- [# L O; I& k) \8 ?& i& \4 \ - Database=test
2 V4 @4 b: e$ ] - Hostname=127.0.0.1" w: G* b1 Y R( b$ C
- User_name=testuser* Q$ B1 S+ Z0 e% T7 J% ~
- Password=my_password
- P' ^# j8 R$ J6 x: j* ~, V, j* g" l - GetDriverFunc=getSQLDriverMYSQL2 \! Z( P2 {5 g% C) _
- VendorLib=libmysql.dll$ @. r+ B* ?8 k ^7 A
- LibraryName=dbexpmysql.dll) T+ u4 P/ s t& ?. `
- Active=1
# C# h: i$ ~2 a1 b- j8 E) M% N - ---example----
2 `- T1 J9 n4 X, g; J! ?3 C - - written 02.03.04 by pwk.linuxfan- Q$ a2 Z. {8 d2 E q
$ ]7 b, y7 w! v9 j
复制代码 |
|