|
|
麻烦翻译一下,下面这段文章:xhan + O" M: h# L7 E
& b7 f( S9 ^, k- y# T
-
1 h* J) a# T* W" S - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 x x5 Z- \! N' z# }
- 5 h6 L9 v; m; |* q/ j! v1 P+ c' _
- ### What we need ###; W; Q" S) }' c& x8 W5 u
- Naturally, we will need a MySQL server to store the data for us, this document 7 } C" s. r1 C/ p" ^
- will not explain how this can be done - there are documents out there for the * M G2 P, C/ J8 [) E: U
- interested. The requirements include a (empty) database for TeamSpeak to use" U" P8 C# o8 X. j; r t1 i
- and a user account (username + password) that has the permissions to do stuff
; Z6 Q5 t0 m5 j4 w$ w3 v - with the database. Additionally, you will need a vendor library installed on the% G ?+ X( G1 w! B) o0 q5 O
- local machine, this came with my MySQL install.0 c# g% H' s5 {0 v+ b% l5 e/ S
- These instructions will not tell you how you might transfer your data from the
: V1 ]8 a6 T+ P4 P: f# E9 e* Z8 j - SQLite database to the MySQL database, we start with a clean and empty MySQL
* j" {" v, v9 F+ [+ I5 X - database.
( t: D% C" d& M2 ? A5 m - Some users have reported ways to import a SQLite database into MySQL, but at
1 B9 p3 p( f3 Q: {. W% X - the time of writing, there are still too many issues - check the current status( ~% [8 y( D4 E& A8 F; t; b
- in the TeamSpeak forums if you are interested.
- v. E0 W" N, O6 a# I$ R K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: x5 _1 R- ?" X/ u - Borland was used. This driver can only interface with the client library that
$ r( F- ?+ o( Y- ^. p! d5 _- R; ? - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
) o) A2 z6 t8 D% D - client library - basically all you have to do is to use a 3.x client library as # \) Z% Y' d& X; Z" I2 Y
- "VendorLib" and a 4.x database to connect to.) ^& B- N/ c$ [ a2 o8 K0 R2 {; t
- If you need more info about dbExpress, you can contact Borland./ A8 N. U# j. i* o& i
# t' ^' {# \% h0 S- ### Doing the work ###
( M: D5 x; q5 q0 w9 |$ T* J, _ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ m$ b# B9 H9 ^! M, \& ]/ A
- the perquisites right, just open your server.ini file, and add this section at; \+ D' Q9 X4 q, w/ w
- the end:+ V7 G) ?6 z" ^7 w3 L6 r6 T* q
- ---cut here---
J; \& U' ?) X; ^) V/ X9 N Z! W - [DBEXPRESS]
8 j# k$ ^1 e9 u/ o: b0 _* b* H( Y - sqldir=mysql_sql
' K! J; R0 f. M+ A5 r - Drivername=mysql0 H1 Y- X) V! d* D, q( H
- Database=Your_Database_Name_Here
' ], o" h; z# ^; r- ]$ Q - Hostname=The_PC_the_MySQL-Server_is_on) g+ o) ], W( D3 {2 K: |
- User_name=User_name_on_the_MySQL-Server
; J4 g/ j8 a+ H: b( U7 P5 P- q - Password=Password_to_go_with_above_user_name
- U% h' A3 h: r: b Q2 L - GetDriverFunc=getSQLDriverMYSQL2 v, P* w% [ D3 U
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ f: B Y* }- C4 R' z8 T1 g - LibraryName=path_to_libsqlmy_libary
" }7 {3 C; M6 l2 X8 c5 } - Active=12 D/ j$ u- c# h7 ^% b) n4 a
- ---cut here---
# @0 Q- X6 D8 R; s" `% _ - In my environment (a linux box with a MySQL server running locally) I have:& P2 N6 ]% j9 V. d0 w! Y% h% [* G
- ---example---% K0 r8 }. \* e2 ]2 p/ _* U, D o4 Q1 J
- [DBEXPRESS]
- R$ _3 F, B4 e - sqldir=mysql_sql
; C1 Y0 ^4 v5 m: \ - Drivername=mysql
. \9 E3 F% R: `8 {7 i! x) d$ x' g - Database=test
( u/ ~/ y7 M& B4 r' \. }3 d6 c - Hostname=localhost
1 X) v9 {: Q/ f; W4 b7 q - User_name=testuser5 |: \$ T& e& V/ v
- Password=my_password
2 k5 c6 `" r! i - GetDriverFunc=getSQLDriverMYSQL2 a8 T! ?8 o" H I: c* q$ T
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.06 i0 P+ |) b3 X- u0 H
- LibraryName=./libsqlmy.so
# o. d5 y& t" H/ E" o, L - Active=1
$ T* ~7 ~- X h$ a1 e; d- Q4 Q - ---example---/ o! D! E/ j0 P g
! W; {+ S! [+ E( B- U, e$ O+ I- On a windows box, also running the MySQL server locally, it would be:
% z/ r& l4 K) H$ E' ~6 } r& D - ---example---
2 C, _9 O; W" p - [DBEXPRESS]
: O9 h5 t1 d3 H# @$ j3 q, h - sqldir=mysql_sql
3 s' B7 s0 W7 K1 w* ~$ a7 H - Drivername=mysql4 e0 w5 Y! w$ l& G
- Database=test- P6 b6 t p# Y: N3 ?2 r x( T
- Hostname=127.0.0.1
0 a$ y) g$ L D/ Y# Y2 @ u2 b - User_name=testuser
1 T. W ?# ~! y9 @3 f5 I0 ]. | - Password=my_password
- U' f4 j7 |/ E - GetDriverFunc=getSQLDriverMYSQL8 t5 M0 X2 U. l8 J/ R1 c
- VendorLib=libmysql.dll
7 ~3 ^8 I ^; Z/ y& o - LibraryName=dbexpmysql.dll
+ y# s# e7 A" W6 h4 U7 ] - Active=1" p8 g4 r& E9 M( F* `
- ---example---- T4 [+ w5 B, v, |7 X
- - written 02.03.04 by pwk.linuxfan' p9 ^0 h' M; E
- % F% M, l9 _! h' O; g$ F
复制代码 |
|