|
|
麻烦翻译一下,下面这段文章:xhan
* [# m$ o* k. p. p) u& l, D4 G! K; a5 V2 s9 m
-
; }% ^4 v4 N7 q$ L( Y! R3 [* Z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' j7 c) S/ d$ [& p& s8 c - 8 v& e3 |8 x' Q5 P
- ### What we need ###! M y. n+ X' P2 E* Y
- Naturally, we will need a MySQL server to store the data for us, this document
- m: D: N0 v9 p: } K - will not explain how this can be done - there are documents out there for the ; E% }4 ?1 i& P0 G/ n( s
- interested. The requirements include a (empty) database for TeamSpeak to use9 Z* [2 J2 H( A+ Y
- and a user account (username + password) that has the permissions to do stuff B+ r6 H; t0 ^4 t4 D* f
- with the database. Additionally, you will need a vendor library installed on the+ a; b$ _6 v" z& \
- local machine, this came with my MySQL install.
1 r1 @3 [( p. j8 h - These instructions will not tell you how you might transfer your data from the
9 c* I4 |4 a% c6 N3 L; @8 ?. k - SQLite database to the MySQL database, we start with a clean and empty MySQL' M4 o; D! H" K3 Y6 @) R: C& b5 d
- database.
# Q$ T' @/ p2 }8 Y8 W - Some users have reported ways to import a SQLite database into MySQL, but at
) _2 [! M- ?+ R/ l) F( C - the time of writing, there are still too many issues - check the current status# W/ f* T3 F+ `/ Z; F* U6 G" ~
- in the TeamSpeak forums if you are interested.4 r& }# e# k2 }/ R2 N+ i _) Y
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& Z( U0 q: h4 _) J
- Borland was used. This driver can only interface with the client library that
; n Y! S$ u& Z0 c% d( W5 V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ [! @% J5 j7 j8 t; ] - client library - basically all you have to do is to use a 3.x client library as 9 r0 `8 w7 u8 M, o: t
- "VendorLib" and a 4.x database to connect to.4 m" l* N3 D( H- V ]5 s
- If you need more info about dbExpress, you can contact Borland.
7 Z# ^: a, e6 Z' l. w- m
& D. T0 a$ B* ^/ ~- ### Doing the work ###
2 M+ o w; m; X+ _; W, S - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( Y: R6 M) g2 x5 T4 H" h
- the perquisites right, just open your server.ini file, and add this section at
9 y, c4 c `' A- u* L) K - the end:- q8 m7 ~0 Y" c. \" V
- ---cut here---
; E0 ?1 p$ x' t! m - [DBEXPRESS]" Z% P$ e! g# p
- sqldir=mysql_sql5 d7 r0 Z8 _# u- K# g0 ]
- Drivername=mysql, H9 t2 T7 k5 |
- Database=Your_Database_Name_Here. K4 m. v6 P: |; C( [
- Hostname=The_PC_the_MySQL-Server_is_on
6 @: Q2 U3 n! I3 S. K; e4 N - User_name=User_name_on_the_MySQL-Server' U' I9 o2 U9 s& a# n& _- y
- Password=Password_to_go_with_above_user_name
2 V# N9 h! z6 B0 k - GetDriverFunc=getSQLDriverMYSQL
8 b7 w6 P% y; M s+ g9 Q, V1 U - VendorLib=path_pointing_at_your_mysql_vendor_lib$ W5 J: B# \* @: P; K4 z9 }
- LibraryName=path_to_libsqlmy_libary8 b% }. k% e4 ^7 n2 r2 N
- Active=1
7 \! r7 g: }9 d: f5 V& R2 c2 Q - ---cut here---
' Z3 Q6 U! _4 a - In my environment (a linux box with a MySQL server running locally) I have:' T5 H1 s* L* E
- ---example---% R' Y Z3 n# e+ c+ y
- [DBEXPRESS]" L4 i1 u2 W! \# e/ o
- sqldir=mysql_sql
, @6 k7 h' G$ l! c; Q" w: o7 B0 m+ w - Drivername=mysql
' P+ O2 K' i0 k6 O9 J - Database=test
( I9 m; o4 M* |$ B" m - Hostname=localhost
- X4 E/ O. P8 G7 L+ Y% m - User_name=testuser
$ a( B/ q1 v) O% O& o% O! @! u) o - Password=my_password: y8 ^" @$ ^* D0 @. m6 P! H
- GetDriverFunc=getSQLDriverMYSQL
9 ~* c% h; A! i - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 Q: P' f- V6 W& \
- LibraryName=./libsqlmy.so! k, A( V& v4 F9 d& O8 u7 k
- Active=1
8 S+ M3 K3 K: O5 S1 s& l - ---example---$ q4 c. r" Y8 p) T) Q: C
- ; `" n, T' c) x+ Q/ u2 |
- On a windows box, also running the MySQL server locally, it would be:
4 e' F- E; E, t - ---example---
7 b% _0 Y7 B2 P: c - [DBEXPRESS]
& }/ z- L/ r1 Q- Y; N - sqldir=mysql_sql; ~% V. F1 J8 I% k
- Drivername=mysql( ~7 b- t* N4 `: l8 D k( c6 P
- Database=test" X; k( N3 t9 M
- Hostname=127.0.0.1
+ |7 N! Q( T0 A* ?9 C0 { - User_name=testuser! ?, ]3 k: l' a& m
- Password=my_password
) L5 h; x" k( ]! k$ F5 k - GetDriverFunc=getSQLDriverMYSQL+ o# {0 a- x$ x( G
- VendorLib=libmysql.dll
6 a5 A F9 }( \& n6 Z - LibraryName=dbexpmysql.dll( v9 s+ B ~; J) {
- Active=16 q0 P" x: ^5 C# p9 `
- ---example---- I2 e7 p$ K$ e- I. r3 s
- - written 02.03.04 by pwk.linuxfan6 i# j7 H* x* ?
- : |3 F0 ^/ {! y8 A3 t3 j
复制代码 |
|