|
|
麻烦翻译一下,下面这段文章:xhan / J- }/ x4 G! t1 T
7 P: j6 \) V0 l2 Z$ q }: w
-
8 G- l3 K \( Y5 s9 C% x. j( ~4 j Y$ b - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' [5 n4 y. Z$ M$ Y+ b - 1 v' Y4 Y; c9 z7 K
- ### What we need ###
$ D" i v/ B8 m8 w1 I+ m - Naturally, we will need a MySQL server to store the data for us, this document + h( W* Y3 v- i$ S: } ~+ k- o
- will not explain how this can be done - there are documents out there for the 4 _; j" Z: C- _' I1 d
- interested. The requirements include a (empty) database for TeamSpeak to use# G) ^: n* ?/ x! x: H1 X6 p
- and a user account (username + password) that has the permissions to do stuff
" i# j) w; v8 j( T. w$ c } - with the database. Additionally, you will need a vendor library installed on the5 B: {+ h n: \$ ^7 l
- local machine, this came with my MySQL install.
: F T. H. I4 L1 H' }2 ]8 F, G8 v - These instructions will not tell you how you might transfer your data from the2 [! F: L( _+ x3 W; ^
- SQLite database to the MySQL database, we start with a clean and empty MySQL9 S: o$ H* `. \' M
- database." u2 Q& z8 B0 ?) Y# ~+ ^
- Some users have reported ways to import a SQLite database into MySQL, but at9 ?$ K+ b8 U! r- y9 d0 m' o& C
- the time of writing, there are still too many issues - check the current status
, M, \: X. Z: A( U: `, ]+ ] - in the TeamSpeak forums if you are interested.# u( R7 @ a) R5 G$ q' W
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from" S, L/ X$ |3 P5 c1 z
- Borland was used. This driver can only interface with the client library that
& f8 G' C. N* }- g' p% E" k ` - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
, P, T) }1 L) z% `9 P - client library - basically all you have to do is to use a 3.x client library as
% K4 h- O0 B2 v5 a8 I- [; c3 s - "VendorLib" and a 4.x database to connect to.
9 G6 [& v2 a' r6 m ? - If you need more info about dbExpress, you can contact Borland.: a7 B9 Z" J; u- S
- , j, F, {4 W2 I$ @6 I' F& b4 ?, B
- ### Doing the work ###
: n. H N; ?$ u" B, {* T" ? - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
) M9 h; `" F/ l% i - the perquisites right, just open your server.ini file, and add this section at6 {5 a/ _* r; W4 w4 G
- the end:
( W [5 N( Q! P. |& g. d - ---cut here---. t4 i2 B( Y+ m1 {1 ~% z9 O! \
- [DBEXPRESS]0 o% h1 p' ~9 [' M$ k
- sqldir=mysql_sql6 ^1 N/ _* ~( [+ ]: f
- Drivername=mysql/ A6 A7 e% j( w, m: f* {, S, V, l
- Database=Your_Database_Name_Here
! t. f/ o" y# z8 a7 M5 u, v4 r1 b - Hostname=The_PC_the_MySQL-Server_is_on- ~2 z: U$ |2 u
- User_name=User_name_on_the_MySQL-Server
# z4 ~8 G; b' B: I* N4 | - Password=Password_to_go_with_above_user_name4 a; m E6 m: O* X* A
- GetDriverFunc=getSQLDriverMYSQL
; B8 `4 r% b6 [8 O, y - VendorLib=path_pointing_at_your_mysql_vendor_lib
; D% q1 ` i" ^ {7 Z - LibraryName=path_to_libsqlmy_libary5 |5 S5 I q! @, G) I
- Active=1) U; x. h. ^+ s
- ---cut here---
) A$ {6 o5 r# t# j- [& Q - In my environment (a linux box with a MySQL server running locally) I have:
5 G. [1 j* w+ [6 ~% g! u - ---example---
: f7 N- b2 z2 A/ i; g# F - [DBEXPRESS]! |, u, D6 \" f5 ]7 S
- sqldir=mysql_sql, v7 J4 k7 l0 k. Q1 H8 Q
- Drivername=mysql& V6 _- B) b* h& ]: @) U4 D
- Database=test) O" M9 D, S7 Q9 h: c% g9 [
- Hostname=localhost) G6 O3 g! M$ Y
- User_name=testuser; m8 M0 C$ i- @
- Password=my_password' R) q% U: w/ f* p1 u- T
- GetDriverFunc=getSQLDriverMYSQL
; q/ B, ~9 g% u: A - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
) u8 C8 @- j7 A - LibraryName=./libsqlmy.so2 b5 |* ]! c+ Q5 d1 Q
- Active=1
2 c; I/ l2 D% ]4 z7 {8 Q1 ? - ---example---
; W# L @+ G% r/ U2 m0 S - * u2 J- ]/ t8 G+ L. @7 t; H) ~0 }
- On a windows box, also running the MySQL server locally, it would be:
+ X' j' r# q. H - ---example---0 ^/ V6 x8 a! v" a9 w5 i2 G: d ]
- [DBEXPRESS]
! m7 \* x( r& a& H - sqldir=mysql_sql" [2 P9 r+ L4 @0 A
- Drivername=mysql$ y0 _) [8 H* P# E& y# W) D
- Database=test, i9 A. h7 X$ R- P+ ~
- Hostname=127.0.0.1/ T9 T3 q' V% O9 w; [6 }& l! k
- User_name=testuser! K, F5 I; A, F, W6 b1 A) n y
- Password=my_password
4 B. v9 G2 {5 \% Z* \& Z - GetDriverFunc=getSQLDriverMYSQL
8 g4 u: {7 f- M( K b - VendorLib=libmysql.dll& U* k7 d% |* s
- LibraryName=dbexpmysql.dll& P* i, Z1 [1 E) M |
- Active=1" `- S, g2 o/ }4 T+ Y4 C
- ---example----
. G4 Z6 T& e" G# e1 H. T1 X1 k; A - - written 02.03.04 by pwk.linuxfan
" G! ^. r8 g- p - $ S* Z [' V; p+ u' p
复制代码 |
|