|
|
麻烦翻译一下,下面这段文章:xhan * Z8 G, M& s% B7 R3 I
) c$ i- d. i6 U" c/ U4 w2 a. S, C-
9 H! W. F$ m" D q: i - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
g1 T$ F% B4 G" Y5 t - : f A3 ^8 ~" _, q D0 M/ y6 d
- ### What we need ###
$ y( |$ H* f2 g% ~; I+ q - Naturally, we will need a MySQL server to store the data for us, this document ( \" c% r( o. [0 f& v# r' z
- will not explain how this can be done - there are documents out there for the / ?$ F1 H: s! j* [% N g
- interested. The requirements include a (empty) database for TeamSpeak to use
& v _) o2 U9 H7 N% C - and a user account (username + password) that has the permissions to do stuff
( o4 q) w5 {2 Y/ q - with the database. Additionally, you will need a vendor library installed on the4 n9 k; u' I# Z7 Z
- local machine, this came with my MySQL install.
, S6 s0 J2 b8 c - These instructions will not tell you how you might transfer your data from the
2 p7 H6 @! l% a h7 | - SQLite database to the MySQL database, we start with a clean and empty MySQL
# t( k" |9 Q% }! O - database.
, k, p+ |" d4 D5 B4 F - Some users have reported ways to import a SQLite database into MySQL, but at1 a' M3 g, U4 H
- the time of writing, there are still too many issues - check the current status
9 @5 L9 P0 l" p/ P. n - in the TeamSpeak forums if you are interested.
1 A: t2 D% q4 _; j# ? - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
`" T }) V; ]4 V* c" _, ] - Borland was used. This driver can only interface with the client library that
, M) [3 ^- A" |5 Y" [4 s( a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) L% E; `/ \+ c6 n
- client library - basically all you have to do is to use a 3.x client library as ! }' E& o3 k# h0 g0 Q: B
- "VendorLib" and a 4.x database to connect to.) E/ k8 H# m! G+ @- q+ S9 O
- If you need more info about dbExpress, you can contact Borland.7 V7 ~1 Y; N z6 \# V
P- z( K: J$ P3 [% `$ m9 I: S( ^- ### Doing the work ###
! _: p U4 Y" u5 Y/ |* L4 e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 a3 s( [% p @3 ~; z - the perquisites right, just open your server.ini file, and add this section at
. o$ t" q( @+ H/ ] - the end:6 F; B3 b( j ?5 G! j/ [5 L' x! ^6 l
- ---cut here---+ _8 n) l. T2 ~. W+ z
- [DBEXPRESS]
! J( D% B+ T. H: w8 T& H! F( C - sqldir=mysql_sql/ f3 Y: \- \7 A' B( O2 l' v
- Drivername=mysql
, |" e, z- R" K1 R2 M - Database=Your_Database_Name_Here
1 O; L, i4 h! d. u/ C) I* `) C - Hostname=The_PC_the_MySQL-Server_is_on! Y' e* h& g1 t
- User_name=User_name_on_the_MySQL-Server+ W' `' \( ]4 ?7 l
- Password=Password_to_go_with_above_user_name
/ _+ t# Z6 _- w% A' q, ~ m - GetDriverFunc=getSQLDriverMYSQL
9 ?$ U2 L2 F' G7 ~ - VendorLib=path_pointing_at_your_mysql_vendor_lib
: G* d8 T+ H: r+ H! I/ W - LibraryName=path_to_libsqlmy_libary. D. x" N; n* f0 ?" n
- Active=1
" l' A4 Q. G1 v4 \/ @: n, g - ---cut here---
) @6 V. h" v, T9 d8 j6 a - In my environment (a linux box with a MySQL server running locally) I have:3 r: V5 S, X7 ]6 u* t
- ---example---: v2 l' E6 {7 E7 Z' A
- [DBEXPRESS]+ k, l' X) P; Z
- sqldir=mysql_sql9 V* t, T5 ]" @0 N2 R
- Drivername=mysql( X: L- u. K. M7 r. @ a z# D
- Database=test
6 ?5 l" a+ K- S - Hostname=localhost
& I0 e4 ~5 \1 ^* W* N - User_name=testuser
/ W) [' `& `- [4 k% x, Z - Password=my_password5 w: @- D4 R# q. A: C" k
- GetDriverFunc=getSQLDriverMYSQL
, s0 i: @; R$ f1 c l - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. y; E# y+ T+ Q0 f9 Y1 w
- LibraryName=./libsqlmy.so g' R) n6 o, C: q: L- K6 H
- Active=1
7 C) s& r9 {; w: T. G& X - ---example---, j; g9 p+ P, P5 B# ^) Q
- 7 K' N2 @/ Q/ d- w* D
- On a windows box, also running the MySQL server locally, it would be:
+ n3 Q W$ d6 W3 t2 r& ]1 | - ---example---7 x2 X5 N7 `8 R ~" H+ h/ N9 ]
- [DBEXPRESS]
8 m: u, }/ _" T - sqldir=mysql_sql
. o0 I1 s% `( w - Drivername=mysql
8 o1 t( S8 }% S* a( H0 ~2 } - Database=test
5 z1 ], ?: t5 ]6 ~9 S2 m - Hostname=127.0.0.1
- A, J C% G6 l* i" ~' k - User_name=testuser
3 _6 { D& B P9 ]; c - Password=my_password
1 J' B: k: q! f" j! Q. B$ ^/ _ - GetDriverFunc=getSQLDriverMYSQL$ Q- D0 [7 l/ R! l& t) z$ |0 @
- VendorLib=libmysql.dll
% V# n& Q& W" g/ a3 Y" Q5 S - LibraryName=dbexpmysql.dll
8 Z* h0 u/ D$ d3 Y - Active=1/ g! I/ e$ U' l# c5 q
- ---example----
$ _1 C/ D2 F8 \2 H' n/ T - - written 02.03.04 by pwk.linuxfan: h& B+ l) f6 R. o( V
4 Z) S, L0 d1 A2 @% `
复制代码 |
|