|
|
麻烦翻译一下,下面这段文章:xhan : x8 F% z" |/ d
5 I9 z3 K8 D' p5 p; G
-
. j- s$ `. y& y2 r9 i' g8 ~ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 U( y! B( z, f# j/ x' V
- : f" |* x5 ~. j. g2 Y$ S
- ### What we need ###5 d6 u" G( S; v- v+ \) z
- Naturally, we will need a MySQL server to store the data for us, this document
$ \- H' |) {; M3 Y$ _1 c. h - will not explain how this can be done - there are documents out there for the
2 V$ s- z- @9 }) a - interested. The requirements include a (empty) database for TeamSpeak to use
8 `: n( v- C# ~3 V _) o - and a user account (username + password) that has the permissions to do stuff1 e+ K5 J& @0 H1 s2 f8 ?* K) E
- with the database. Additionally, you will need a vendor library installed on the' O% [8 j, ]% K2 S# o$ \
- local machine, this came with my MySQL install.
+ V+ F9 w& l8 r0 F. \% R3 a e - These instructions will not tell you how you might transfer your data from the$ H' {1 C( E5 F# q+ _5 N
- SQLite database to the MySQL database, we start with a clean and empty MySQL
/ g3 {; \# r5 f' I4 y8 e: I2 I9 Z - database.
/ \1 Y$ V1 x/ a7 N$ p" k - Some users have reported ways to import a SQLite database into MySQL, but at
! {2 `+ z8 e3 Q0 r - the time of writing, there are still too many issues - check the current status
* ]3 q) P' f6 L/ m' [; l* Q - in the TeamSpeak forums if you are interested.
9 O9 g1 i4 W1 X: M. M - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 L3 T. C7 d; G1 L. p* } - Borland was used. This driver can only interface with the client library that
3 I6 F4 B6 D( M; v* I$ t - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 S. T& Z, g7 E/ f& U* h - client library - basically all you have to do is to use a 3.x client library as ; n' }5 h: C* P0 s
- "VendorLib" and a 4.x database to connect to.
) C2 k; U; G: G: J1 E: C - If you need more info about dbExpress, you can contact Borland.
* K( H0 [6 M$ r3 v3 X$ u
$ Z8 c# @" S- N9 n" q: N, m- ### Doing the work ###5 h3 C- q" h+ H8 m7 p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all% M0 V x' X; Z2 o$ S. N# [
- the perquisites right, just open your server.ini file, and add this section at
! p5 v. u7 }% q4 ^, W6 d - the end:. v# _: \9 b" `
- ---cut here---- h& J' G' R) J- F+ v# M9 \5 q0 M# g4 f
- [DBEXPRESS]- P! t6 {9 F6 v6 t3 w7 F
- sqldir=mysql_sql, r, S# Y2 ~$ c2 x7 @" Z
- Drivername=mysql9 q: p- t+ Z# K5 N* o0 s
- Database=Your_Database_Name_Here
5 v5 A& @- ^# o/ [4 I - Hostname=The_PC_the_MySQL-Server_is_on
7 M' }' {3 _5 {. ]( Q7 w - User_name=User_name_on_the_MySQL-Server
/ R' v4 f o$ O$ N' T - Password=Password_to_go_with_above_user_name
* C% [, M3 E/ S; ?2 A# c% [ - GetDriverFunc=getSQLDriverMYSQL6 |* x: U0 m* r# ?$ Z
- VendorLib=path_pointing_at_your_mysql_vendor_lib5 I; A G/ i4 ?! [; e8 c
- LibraryName=path_to_libsqlmy_libary6 b7 U& F; p8 g- t6 f
- Active=1
+ Z1 q4 @6 I" n6 J& z, n5 u9 } - ---cut here---
]- @- l+ Z1 E$ |: b' ?/ W - In my environment (a linux box with a MySQL server running locally) I have:
& @* x( k- t9 T( Z - ---example---
4 U1 j3 A3 ]3 j+ n) C" V, d - [DBEXPRESS]/ g' w# f3 o$ @# P& `
- sqldir=mysql_sql
, k# L. N; T/ s# h: m6 d - Drivername=mysql8 g( b/ _: d& I2 P) G4 o- |$ t
- Database=test: _9 P7 U' D. T: n8 r, P
- Hostname=localhost
) [- @* l" T m3 y; M' ]' e/ K! S/ W - User_name=testuser7 B. I p% ] d' o$ X1 z% V
- Password=my_password* m0 a, C# y: x5 l' `
- GetDriverFunc=getSQLDriverMYSQL
, L) S% {- W7 H( _& P5 M - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
' f1 h5 e- T" B& b# v, Z( | - LibraryName=./libsqlmy.so# U8 \: H& `7 N- N1 @
- Active=1
- y1 w% r; N! G) V - ---example---, g+ L: } k' U
- y6 n& V) s5 n) G
- On a windows box, also running the MySQL server locally, it would be:4 a3 w- i. k8 w
- ---example---
6 E7 ^' K% ^% {- v3 U - [DBEXPRESS]
# b O- N! F+ N+ s7 d- [ - sqldir=mysql_sql
, q& d( x7 M) e' G9 A6 ]6 y - Drivername=mysql
( b. r5 q! j. T7 F - Database=test" I) _3 f- E0 P6 j: T! C
- Hostname=127.0.0.1
9 }" V. K3 Y) A- q. [& p - User_name=testuser* }$ v0 _/ s0 U$ h
- Password=my_password
: w' }9 C" F @/ j' w - GetDriverFunc=getSQLDriverMYSQL
. C! B' T' l" M8 D8 A - VendorLib=libmysql.dll. x) J2 z8 P- g! g4 m( b
- LibraryName=dbexpmysql.dll
: A5 p2 h" \& e @. t+ M4 q# C# U - Active=1
% O* B" S! B& k6 X$ l! | - ---example----8 R3 ^ v' Y, q8 w
- - written 02.03.04 by pwk.linuxfan' N# q- G. M2 j+ }& J: W
- 9 [! V0 ~! y4 c& _
复制代码 |
|