|
|
麻烦翻译一下,下面这段文章:xhan
7 k, d; p$ p9 `7 `5 w
, M, j2 G; t3 T1 ?9 @- 8 `5 P4 z6 p+ i7 E! M! e' G' H$ b
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* C4 p9 z& c" w, p0 q7 }- F
+ B2 v# f% |; j/ t- ### What we need ###
' l, |6 J! j0 G: I( a" i - Naturally, we will need a MySQL server to store the data for us, this document 6 M J# P/ P/ K. c# [
- will not explain how this can be done - there are documents out there for the
( N7 |( b1 a/ U+ L - interested. The requirements include a (empty) database for TeamSpeak to use0 ]9 P6 Y/ U7 V1 o D# s8 L: o
- and a user account (username + password) that has the permissions to do stuff
5 q1 D3 G5 s$ K - with the database. Additionally, you will need a vendor library installed on the: `# v ^' d2 K5 X5 j, \3 o
- local machine, this came with my MySQL install.1 i7 k% v3 i& G$ a9 b$ Y- m
- These instructions will not tell you how you might transfer your data from the; P. R% B8 o3 t& S
- SQLite database to the MySQL database, we start with a clean and empty MySQL: p4 A: f4 _4 J9 A
- database.- G0 W* a* z4 R: c U; ?
- Some users have reported ways to import a SQLite database into MySQL, but at2 B4 M8 ]3 P5 N6 s, e
- the time of writing, there are still too many issues - check the current status! s# {2 t2 I) s l) s/ B
- in the TeamSpeak forums if you are interested.; E' ]" C# c& ]2 ~, G( _' S
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
D" i7 Y, c3 r1 J$ \' o. W; h - Borland was used. This driver can only interface with the client library that
, n6 e" Q0 l( J: m - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 \; F U+ u# G# k3 | - client library - basically all you have to do is to use a 3.x client library as
5 m3 C4 V3 v4 T6 t8 P( x( O& [ - "VendorLib" and a 4.x database to connect to.
; c8 B/ E6 D( r" Z, j - If you need more info about dbExpress, you can contact Borland.
: q1 d6 Z. {7 w, E$ w% U - ! W6 X( ?8 Z# t- E$ L7 [0 P
- ### Doing the work ###
7 S# [. y# ?+ G& s - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
" f; U6 q* v$ N* r3 `+ E0 @ - the perquisites right, just open your server.ini file, and add this section at
0 W E4 H/ w" A/ A/ L - the end:, s' W0 |( Z+ T9 A1 p
- ---cut here---7 ^2 f, f+ ^ T' _
- [DBEXPRESS]" W8 R9 n* q9 L2 o/ O* |6 d
- sqldir=mysql_sql/ R8 L& Z. A" h
- Drivername=mysql
) [7 }: K$ T6 @* C, K - Database=Your_Database_Name_Here
) m) [# l$ S) M! j - Hostname=The_PC_the_MySQL-Server_is_on
' M8 U9 L7 f3 b - User_name=User_name_on_the_MySQL-Server
5 t9 }6 }' m; G# S - Password=Password_to_go_with_above_user_name
5 C" f( t2 s$ Q" t; d - GetDriverFunc=getSQLDriverMYSQL q& j/ d, D& {; [- P
- VendorLib=path_pointing_at_your_mysql_vendor_lib
2 q. ~0 s' a( v+ y" D - LibraryName=path_to_libsqlmy_libary7 y' d" Y* m) M1 R( U* F
- Active=1$ p: G4 t8 j; Q& C9 g
- ---cut here---
: |7 c' q; P5 a! }- a - In my environment (a linux box with a MySQL server running locally) I have:
3 _& ]* o- a1 e - ---example---
7 ~# R" o Q" K0 Z. M5 U# O - [DBEXPRESS]
/ t/ K9 d" V; W. Y3 F - sqldir=mysql_sql
5 g! |, Q' j8 G - Drivername=mysql
8 I9 ~1 p% f: c% F1 b% A - Database=test! F+ p' j w: ?, g T+ i
- Hostname=localhost
$ H( \/ X- ^0 l1 o1 ~ - User_name=testuser
* h3 E, ?. M: }6 W# Q5 v - Password=my_password1 o# ~. i3 ~. m
- GetDriverFunc=getSQLDriverMYSQL
$ q5 H6 C! [8 u$ x/ Z% P - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! {- W6 i% [& L) Y$ I9 V- M - LibraryName=./libsqlmy.so
$ j: D ~8 d6 v9 ` - Active=1
5 f2 a# @ s) C+ B3 x } - ---example---
$ B: c( m$ q# l% J% n: c
+ T: P5 K" l$ ^+ ~; f$ p# D" }- On a windows box, also running the MySQL server locally, it would be:5 w0 {. f; r% o/ P6 W
- ---example---
1 l6 s' u) |: A6 e% r5 d& L - [DBEXPRESS]+ S3 v( B! n' K4 v0 _2 F9 [+ j
- sqldir=mysql_sql
# n4 ^3 H( [2 }6 w! a5 b& B3 \ - Drivername=mysql
0 A- i6 f+ m& Y& b1 h( j - Database=test$ S2 u' i; l N; }
- Hostname=127.0.0.1# q6 }0 e1 m q
- User_name=testuser& W9 m8 }! e' \( \# y- s
- Password=my_password* ]( R m6 |+ n7 \( Y
- GetDriverFunc=getSQLDriverMYSQL% T' C) @% g0 U) ]2 K% Q
- VendorLib=libmysql.dll
4 F; j g9 w$ t - LibraryName=dbexpmysql.dll
+ a: _% c1 X& _% m5 ^' ^/ j - Active=1
9 O/ h5 `) A; I6 H, p' ~ - ---example----
( c; a4 f/ J4 v* d' D - - written 02.03.04 by pwk.linuxfan1 m% ]# p5 x& J: E! s$ h
4 Y, Q ^- j. c d- P" M
复制代码 |
|