|
|
麻烦翻译一下,下面这段文章:xhan ) S& }/ ? v5 h7 N, {4 Y8 m {1 S3 k
6 Y1 o- T* E3 E' v0 E9 @% a- # c/ h4 t) p4 m( o4 [8 E
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 Z' Y0 V0 w) w5 A
* `9 ?% G3 _1 s$ j4 e- ### What we need ###
4 S) n6 O# B& _3 k - Naturally, we will need a MySQL server to store the data for us, this document
7 g6 v K1 S3 Q - will not explain how this can be done - there are documents out there for the
( w: ]4 {3 O+ } - interested. The requirements include a (empty) database for TeamSpeak to use
; S* m1 t. {' ^$ b5 i7 \ - and a user account (username + password) that has the permissions to do stuff
* `( Q5 w$ T% b - with the database. Additionally, you will need a vendor library installed on the- K8 o' u' g& O& c p; `8 h& ?1 [
- local machine, this came with my MySQL install.* h5 O( d& v: m0 e7 N+ C
- These instructions will not tell you how you might transfer your data from the
) u7 o! ]% ^+ j - SQLite database to the MySQL database, we start with a clean and empty MySQL7 `$ F7 \- X! a: A1 |
- database.6 {9 u: H" Q! s
- Some users have reported ways to import a SQLite database into MySQL, but at
4 Q2 k0 g) V. N* H- K - the time of writing, there are still too many issues - check the current status2 a1 A( h# F3 V$ T& G: U
- in the TeamSpeak forums if you are interested.
, ?; V; f! b% U. } - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from4 J! a% |& E. t
- Borland was used. This driver can only interface with the client library that
0 ^/ v: e: S) C' U5 u; o8 |1 \2 B0 ^ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
0 O' n+ N: h. n* g - client library - basically all you have to do is to use a 3.x client library as " N$ J: R) L3 H* [/ e/ {" q, Y0 C
- "VendorLib" and a 4.x database to connect to.
8 ?4 m# |# ^& h+ | - If you need more info about dbExpress, you can contact Borland.- {4 I7 K! C* m$ `& p0 ]" [
- 0 t! p1 B/ f- j& Z% H
- ### Doing the work ###
: R- U$ v: v" P6 O, B. {, G2 w - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all! S# [5 \2 d/ Q! O
- the perquisites right, just open your server.ini file, and add this section at
" A! i4 z% A2 _, p7 V0 ` |) n - the end:
. \8 v' J+ T0 E P- Y8 W - ---cut here---
$ g( ^* w- w# x. B# n( [ - [DBEXPRESS]' c# y# x4 V; o" @5 o4 n/ w3 f# A
- sqldir=mysql_sql
% E0 N& v3 N; n: e' P - Drivername=mysql K' ^" W. ]0 ]( X/ Y
- Database=Your_Database_Name_Here, x! f% q' d( k- l" f! l3 S5 n
- Hostname=The_PC_the_MySQL-Server_is_on* f7 l. U' T5 }4 B. G
- User_name=User_name_on_the_MySQL-Server; v- X Y/ c; ?& y# \: D0 \
- Password=Password_to_go_with_above_user_name" Q x3 k& K/ i. [0 R" K
- GetDriverFunc=getSQLDriverMYSQL
' D! T, l3 U: x* K - VendorLib=path_pointing_at_your_mysql_vendor_lib
" [7 J+ r1 _& X% D4 r. o9 M - LibraryName=path_to_libsqlmy_libary
8 S! n- f5 z9 N$ {+ F( l - Active=11 I% v# ^, H) _! s# |& m
- ---cut here---6 F$ F& `2 n. p8 E5 B
- In my environment (a linux box with a MySQL server running locally) I have:/ F! n% g- h% ~, I* K
- ---example---7 [& G4 x, G z5 m
- [DBEXPRESS]
6 z% p$ y, i$ q M w A; K - sqldir=mysql_sql. y& c S% F9 m4 ~# b# l3 x% Q
- Drivername=mysql+ w! t# _2 y }1 Q, k4 `
- Database=test1 [% V* U& I5 E0 d; S
- Hostname=localhost
. N+ L8 ~/ a/ h$ e- E - User_name=testuser
$ h: s( v7 [0 D% q6 A - Password=my_password
* n: d$ @# Y0 b8 Q: A# m6 o$ J! b - GetDriverFunc=getSQLDriverMYSQL
4 M7 k* d3 a* u$ g) W" ] - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! J/ A7 K" [9 V6 g - LibraryName=./libsqlmy.so5 Q7 h+ L+ x8 a# P/ j7 p
- Active=14 j: Z& _% F. C7 ~6 }8 x
- ---example--- n' F `2 J/ d3 N4 |' `7 Y- V+ d% ?
- # N4 r* a0 M. S( s9 n
- On a windows box, also running the MySQL server locally, it would be:
, v1 l9 i3 t# a: F1 ^ - ---example---* Q3 c7 M& H$ d" O5 ]
- [DBEXPRESS]! _" T2 {: k9 l# P8 N
- sqldir=mysql_sql
4 O Z3 A* C3 v, a7 g - Drivername=mysql
. j# c$ k, h, Q4 K - Database=test
2 k' V) H) @9 Z u0 r - Hostname=127.0.0.1
1 I( C7 n2 G/ g, \& X2 g- _ - User_name=testuser
6 E6 t3 @5 E: O( [. b - Password=my_password
" K1 E9 Z; x; w4 k+ S) ~8 x { - GetDriverFunc=getSQLDriverMYSQL
: k0 S4 ~; T9 ]1 e - VendorLib=libmysql.dll% U/ T. S, E" Z% v' d
- LibraryName=dbexpmysql.dll- |. f% R: s0 X& L r
- Active=1# c0 h. u* |& u& Y6 S: T2 p
- ---example----
, ^1 c% |2 c: e - - written 02.03.04 by pwk.linuxfan
$ p3 D9 i O+ n1 h
5 h" s) I) g9 g5 ]
复制代码 |
|