|
|
麻烦翻译一下,下面这段文章:xhan 7 _" [0 M5 u7 f* u6 x' }8 J
' o5 P7 @2 ~" Z# Z8 U1 J9 f4 I-
% ?" N5 o# @1 ^+ S - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 g: z; }, f' e
- 9 p" k* x) V$ z) R. f
- ### What we need ###
! L v/ H* B# z9 h' ?0 k - Naturally, we will need a MySQL server to store the data for us, this document
$ K, _$ Y: Y/ `7 V$ O! G: O5 y - will not explain how this can be done - there are documents out there for the ( Y: l8 U+ f0 Q# T! g' D I( D
- interested. The requirements include a (empty) database for TeamSpeak to use% X$ h+ D) s+ I
- and a user account (username + password) that has the permissions to do stuff
$ Z0 j& v* [9 _/ _5 L$ U( d - with the database. Additionally, you will need a vendor library installed on the
8 n' I) \1 h+ z! p; |3 ^ - local machine, this came with my MySQL install.
) F* w4 X& m: K. O9 C - These instructions will not tell you how you might transfer your data from the' X) I7 ?: B2 p6 G1 E
- SQLite database to the MySQL database, we start with a clean and empty MySQL
3 p+ `& Q1 C$ Q7 i% ?7 ]$ K8 J - database.
8 d: H7 u7 s$ W4 u' C - Some users have reported ways to import a SQLite database into MySQL, but at
- m, |- p" M4 D) j9 k - the time of writing, there are still too many issues - check the current status* D& ~+ }& T3 F' V
- in the TeamSpeak forums if you are interested.
/ J5 P3 x. I$ P% ?( [ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 j n( i" D" P, W- {, Z0 D2 E+ r - Borland was used. This driver can only interface with the client library that ( q6 N- D& a+ K2 E v
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 `: A9 _' E& s8 g
- client library - basically all you have to do is to use a 3.x client library as
% x0 @) N/ F+ L& F - "VendorLib" and a 4.x database to connect to.
8 }- }, t Y& U5 k" y6 m - If you need more info about dbExpress, you can contact Borland.$ s- @) R, ^+ N, t0 N9 k
- : e, f! [8 w$ P, X1 ]: z
- ### Doing the work ###( g3 j$ l6 B. h% u; U/ t1 Z; J
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 ?# A+ B# ?+ m4 _# y
- the perquisites right, just open your server.ini file, and add this section at
2 r. c8 o1 o" n - the end:; O+ N9 Q5 W5 f4 E
- ---cut here---
" M: e; q, F- h7 b2 U4 E w/ [ - [DBEXPRESS]
$ g5 _5 Q' D/ e% s" D( H - sqldir=mysql_sql
s4 v+ `, p/ N1 W5 G0 n) z - Drivername=mysql. a: R Y1 g0 a1 L( @
- Database=Your_Database_Name_Here
/ ?- H R" b- A$ o8 }0 R8 O% H - Hostname=The_PC_the_MySQL-Server_is_on
4 P4 B# l$ ^- q - User_name=User_name_on_the_MySQL-Server
+ W% Y; M! G! E# M8 E- a - Password=Password_to_go_with_above_user_name% E9 d2 i. n9 d3 D
- GetDriverFunc=getSQLDriverMYSQL3 n1 F3 i# T9 ?
- VendorLib=path_pointing_at_your_mysql_vendor_lib+ {, l4 {4 I" }6 [4 Z
- LibraryName=path_to_libsqlmy_libary
" I d4 I) Y2 |# t0 M - Active=1: ~& y+ y) L/ O g. T9 Y
- ---cut here---
; R( P( [0 E1 _9 D+ ~1 u - In my environment (a linux box with a MySQL server running locally) I have:
+ d5 q: R( g, i! b( d0 \ - ---example---& u) ~* _$ B% w6 ^. [
- [DBEXPRESS]. U" X4 g6 s1 d+ I( u! i
- sqldir=mysql_sql/ [( i; o3 ]% _+ ^2 Q3 p( R
- Drivername=mysql
8 V$ l O7 X1 x9 N - Database=test8 o1 U9 b8 \8 {
- Hostname=localhost
4 n4 e' h# U& B7 c! \2 S' c - User_name=testuser( f. ]9 `) |9 L( E
- Password=my_password
1 c& a8 ^+ _# z7 Y+ |5 d! F+ ]( h$ g - GetDriverFunc=getSQLDriverMYSQL3 K* r$ Z# M. w
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.08 y/ f& \( L: P3 ?, U" [
- LibraryName=./libsqlmy.so3 G' {% `! _2 g0 z" j- I$ _ W2 d9 j
- Active=1" y1 _- [( l' |- _
- ---example---
, E4 Y% g+ ]; M# _% e5 V3 b4 m, d - @5 I5 g& E* G5 L4 H1 z$ ]
- On a windows box, also running the MySQL server locally, it would be:
f+ k- n3 ?( X7 x7 ?# z1 v8 { - ---example---0 M" ~; [/ ~2 p+ w; j1 g& j
- [DBEXPRESS]6 b4 j( C2 Q8 L u5 g
- sqldir=mysql_sql: b5 h3 X+ j: w
- Drivername=mysql
4 @+ D6 u/ N1 V5 {: V4 r - Database=test
& K2 d; }# s' x6 O1 o/ d2 i- X- Y" [ - Hostname=127.0.0.1( `8 ?' c. Z" e" Q# W- W. [8 c
- User_name=testuser
' @ z4 M( H7 _% o) d - Password=my_password
! ?% \4 {/ ?& i* m, N& X$ { - GetDriverFunc=getSQLDriverMYSQL
! S7 x& P: a3 c9 Q# l - VendorLib=libmysql.dll9 z9 e3 P9 l3 s e5 a; W
- LibraryName=dbexpmysql.dll) m \7 Q# Z* b. r& Z
- Active=1, y. P) @. ?* l+ |: P8 T+ s: k- }
- ---example----
| B' K: J8 {. O n" T - - written 02.03.04 by pwk.linuxfan I9 X1 V2 k$ e; n* ?( u
- 5 e4 r5 D+ C3 ?- S9 L5 ], C
复制代码 |
|