|
|
麻烦翻译一下,下面这段文章:xhan & P" D* C: Y* h
* i! ~" P1 M& }; ^. Z3 v
-
j* d2 S& u# T8 } - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 X1 x. H( i7 f: |; K8 _ - - l( x6 O' Q3 ~. _$ ^$ _
- ### What we need ###
& u, @2 L' p- I) u - Naturally, we will need a MySQL server to store the data for us, this document % T# k! M% K1 L0 D6 a+ ?/ p$ }' A
- will not explain how this can be done - there are documents out there for the
% I- P, W# e/ P$ N$ m! f% p2 ` - interested. The requirements include a (empty) database for TeamSpeak to use6 Y% ?" r: O; D
- and a user account (username + password) that has the permissions to do stuff
n7 _( N7 ~) n/ E- a9 c - with the database. Additionally, you will need a vendor library installed on the8 d0 V0 C1 Q) R& U
- local machine, this came with my MySQL install.
* o4 {" V% W. y/ g8 ` - These instructions will not tell you how you might transfer your data from the
8 d$ I, a8 \0 A9 O - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 N& \: K5 S/ x. ~) H - database., C" \3 z; c% S
- Some users have reported ways to import a SQLite database into MySQL, but at
# ^5 H: f9 b: S4 z0 t - the time of writing, there are still too many issues - check the current status
7 ?$ h+ @6 w8 ]% O! U - in the TeamSpeak forums if you are interested.
6 G8 ^; Y9 m& Y1 L. i1 T4 V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; h9 b0 g3 {. E; N, y6 @ L - Borland was used. This driver can only interface with the client library that
$ V9 F, F$ P. U* ~ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# d0 Q+ H' m7 B3 d& T, F" x - client library - basically all you have to do is to use a 3.x client library as
; _& w8 w' m/ E) p - "VendorLib" and a 4.x database to connect to.
2 }, b! h# P- u. c. Z% Y7 A+ j - If you need more info about dbExpress, you can contact Borland.; W, U, j K$ {4 L2 m( {# n8 k
% ^% O, \; b: O. J4 v4 j! a: V- ### Doing the work ###
1 U1 a9 v: K2 Q. f( D - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ f; i8 B! {* Q2 z
- the perquisites right, just open your server.ini file, and add this section at
- }! W6 f W+ |" N/ J6 K - the end:, B7 b2 \: d7 f$ Y: v# w6 U1 C
- ---cut here---
# d% C, A5 k, Q3 |$ B - [DBEXPRESS]
# W+ _" _ Q$ @. @% E - sqldir=mysql_sql
+ t- d5 n5 A: j& v( @% H - Drivername=mysql
8 u* F2 d, {& l* o; T - Database=Your_Database_Name_Here
8 n0 v/ V$ W* W$ L% S - Hostname=The_PC_the_MySQL-Server_is_on( V) E( Q* k: d9 m* t! k
- User_name=User_name_on_the_MySQL-Server
' F- |6 v% h: {6 a: ~. b r - Password=Password_to_go_with_above_user_name
! V0 `$ U$ a* z' v - GetDriverFunc=getSQLDriverMYSQL* u5 T5 {+ F& P9 _+ c7 v8 j+ N
- VendorLib=path_pointing_at_your_mysql_vendor_lib
% \) c0 k! G3 F X( U# t - LibraryName=path_to_libsqlmy_libary
: k7 S7 k9 ^# ]2 e; `* X. `2 ~1 X0 C - Active=1
0 t6 j& j# A$ X' z2 L - ---cut here---$ C# x1 V" }& z# z2 c* r
- In my environment (a linux box with a MySQL server running locally) I have:
: } s4 n) Z1 ^/ @$ M) u - ---example---
4 h- y& I- K, c1 ~" s" i/ r - [DBEXPRESS]
( s; `; U" p% K - sqldir=mysql_sql
1 x& k8 ]: V1 E. S% d2 E) z% e - Drivername=mysql
6 c9 q: b/ W+ Q7 ]8 M4 f$ l - Database=test
6 a" Z0 R( B9 ] - Hostname=localhost
7 z0 L8 o; S1 g8 L4 N6 |% ^3 h - User_name=testuser
) s, Y; u r- A! ]* e9 D. E& l5 O- D - Password=my_password8 f; K5 _% _7 R& n; ~6 L/ R! H. `3 T
- GetDriverFunc=getSQLDriverMYSQL( \( v: l# P& M0 r$ g
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* i* D! s$ ?& ~. Z( Z0 o0 z( {
- LibraryName=./libsqlmy.so8 c- L* Z. E, K) Z) `6 _% r! d
- Active=1
) o) j- F: }+ S - ---example---
6 N2 Q6 q2 D& t1 s' [
# f \ v+ f% U* K+ n1 v( X. h- On a windows box, also running the MySQL server locally, it would be:' B; P" a+ g. G/ I& v
- ---example---, J2 p- y7 ^9 v: |7 H0 I
- [DBEXPRESS]6 I' Q! E4 u# k: V# k4 \/ e
- sqldir=mysql_sql
8 n$ M1 Y/ Q D. F8 k6 J - Drivername=mysql
- C2 L! T, W- |! d' q& p1 e$ v1 j - Database=test9 ~# M% ]! x# x: \
- Hostname=127.0.0.1
+ L8 \- b# p" e3 j2 L! i0 l" p - User_name=testuser
1 D+ W' m9 i3 [& T+ _ - Password=my_password" x- \2 j1 p, J- Q6 g4 D$ m1 v' ]6 R
- GetDriverFunc=getSQLDriverMYSQL
5 i1 d7 [# n5 m- e7 G/ h - VendorLib=libmysql.dll
7 W6 C" D- I# r. R- i! D9 E0 s - LibraryName=dbexpmysql.dll
0 W; U3 W) k) c9 }6 U - Active=1
! e! {+ K; s# W( W; F - ---example----
" ~* Z. u& h" U* p6 p6 @ - - written 02.03.04 by pwk.linuxfan
% u- D0 F2 N8 m2 x, H - 0 X6 G4 r: F/ U& v3 l4 D" o# X& D
复制代码 |
|