|
|
麻烦翻译一下,下面这段文章:xhan
" u3 I3 x$ h) o7 p0 s7 ]9 O/ ?4 R P% U0 a h9 r6 S
- 4 T$ C; z4 o; X7 @, a# V. z- X
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 t2 O9 A/ Z! @6 z F
- + i9 p" b& F9 l+ y5 y- b
- ### What we need ###
# i: M! o, ]8 g1 H/ ~ - Naturally, we will need a MySQL server to store the data for us, this document
& s7 b; J Y' b, F - will not explain how this can be done - there are documents out there for the ) r! l1 n5 K9 k2 O( ~5 ^' F. R
- interested. The requirements include a (empty) database for TeamSpeak to use6 m8 A! P9 _4 [4 [
- and a user account (username + password) that has the permissions to do stuff8 e$ `/ s. M1 O" k
- with the database. Additionally, you will need a vendor library installed on the3 U! V6 v( |! @
- local machine, this came with my MySQL install.
2 @& l3 s& i% u2 H _# Q& m' c7 Y- f - These instructions will not tell you how you might transfer your data from the) J4 e8 {) f& U( d
- SQLite database to the MySQL database, we start with a clean and empty MySQL# e& p e$ ~* [1 C
- database.
: l X) U' n! ` - Some users have reported ways to import a SQLite database into MySQL, but at3 J+ Z; l; ]6 c( S6 n
- the time of writing, there are still too many issues - check the current status7 v% }; ~+ m j" ~0 r( o3 s
- in the TeamSpeak forums if you are interested.
3 `4 x$ Z4 |* c: E: f$ K: p1 e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
# D8 M% w# v. g. M& _0 k8 l - Borland was used. This driver can only interface with the client library that
* d; Q: T9 S5 D2 m* X - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this& A7 v- e4 X3 J. Z. V, t3 w
- client library - basically all you have to do is to use a 3.x client library as 5 _1 t2 F, Y) K$ ]5 a
- "VendorLib" and a 4.x database to connect to.) W: m- a$ ~% ^& w& q
- If you need more info about dbExpress, you can contact Borland.8 j: o/ P! |8 C ~
) u" j# {$ i5 O. @( U& a: q. q- ### Doing the work ###+ q( K, `5 J& ]/ K9 H. u
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- C- B: x/ @0 {. r2 j7 p2 Z1 ~ - the perquisites right, just open your server.ini file, and add this section at
' \' v2 k) V; ?; H( P3 Q7 U' l9 L% r - the end:$ c# y- W/ X1 o' ?
- ---cut here---
5 Q) z: ~7 A. g" S) E5 ? - [DBEXPRESS]
' P. ? R& e1 h# }; ?8 y - sqldir=mysql_sql/ l4 m/ K* I/ p: \! x
- Drivername=mysql
+ Y3 n: J0 Y9 W! S2 x - Database=Your_Database_Name_Here
' B) @% G7 @+ b. ]9 x: _: ] - Hostname=The_PC_the_MySQL-Server_is_on; |6 ^$ r2 W( V
- User_name=User_name_on_the_MySQL-Server& e" y+ D* [. h' L
- Password=Password_to_go_with_above_user_name8 X+ h) a% a0 }& }# a% u* \
- GetDriverFunc=getSQLDriverMYSQL! |* U$ u- c- p3 Q- y; M& j
- VendorLib=path_pointing_at_your_mysql_vendor_lib
) k& Z1 @1 H, `. r: r - LibraryName=path_to_libsqlmy_libary& @* j% ^7 W5 t, q
- Active=1- [6 _' o$ K J& X/ V
- ---cut here---
7 e+ ~$ I, Z+ z - In my environment (a linux box with a MySQL server running locally) I have:" v3 u, @$ c$ E# [
- ---example---
7 f- A9 e, H( ]! I - [DBEXPRESS]
: W7 s6 U# V; d! l4 }1 A - sqldir=mysql_sql
) K2 Q$ r+ c; |0 J - Drivername=mysql+ _6 }$ t, v; z' v
- Database=test
! f- d" m* n! W1 _- ` - Hostname=localhost
. H, W F* @0 o0 a2 o1 R# S - User_name=testuser# r9 c; s5 G# p/ I$ `) e
- Password=my_password, Z; E; |: m. [) L% M/ b2 C
- GetDriverFunc=getSQLDriverMYSQL
0 V: K6 ?/ M# @1 d+ C - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- e5 E) V6 s, L* |9 c9 i+ L( v6 E& V
- LibraryName=./libsqlmy.so8 Q* o5 } R/ X% r2 z& E
- Active=1
) w9 @" Z# I' y" ?, Q% ^1 ^ - ---example---
& c% F, U- |9 q$ ^0 [! G2 E - : K" `% a; k+ Z7 R% j- X5 ~
- On a windows box, also running the MySQL server locally, it would be:! u: s: q8 X7 f) m, c5 x8 X1 a$ c$ \
- ---example---
4 W8 r7 @* u/ r3 [ - [DBEXPRESS]) N" q) c* [& C9 C) U
- sqldir=mysql_sql" B" O. f* D* y. r
- Drivername=mysql
3 |( n c( z( \! f: K4 B7 V - Database=test! U8 w, u5 m2 U% Q8 B' S8 n& Y: ?
- Hostname=127.0.0.1
! S: r1 ^$ H% t1 \( b - User_name=testuser
! ~' ], V6 y* f6 ?4 m% X- G) V( y - Password=my_password
* p4 R" @7 H. ]: S - GetDriverFunc=getSQLDriverMYSQL
3 S: w8 d8 W$ N L - VendorLib=libmysql.dll
) I& F2 e6 B% ?3 h6 K' g - LibraryName=dbexpmysql.dll: h2 [: y7 [5 {5 ^2 D y
- Active=1: {. k' ]" ? |1 E2 ~( T, X
- ---example----; f, q% y/ d9 j/ X$ o- X0 P
- - written 02.03.04 by pwk.linuxfan5 V3 [# a3 z8 g6 T2 ]
- - ^* h. \- A9 ?9 K
复制代码 |
|