|
|
麻烦翻译一下,下面这段文章:xhan # t& O) q1 n; `9 K7 V7 L: \% L9 d
1 R4 {0 Q0 Q! k3 x
-
" f6 Y/ z. f4 n, `+ F; P6 V5 j9 O - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 E* V! m9 r4 M3 c5 d - * B2 s) b# }) x3 A& J; e' z( x; I% G5 `
- ### What we need ###" U: i% l; y1 K: P5 L# O: A- q
- Naturally, we will need a MySQL server to store the data for us, this document - B, q- }& _% v1 o8 T# E
- will not explain how this can be done - there are documents out there for the
+ l) Y4 _! h; `* ?' L; b' K - interested. The requirements include a (empty) database for TeamSpeak to use: y, [) t: u& l5 r% J! g5 F
- and a user account (username + password) that has the permissions to do stuff9 I% |# V" j/ I9 V( E( u# q
- with the database. Additionally, you will need a vendor library installed on the I' _* y" Y: I5 E' m9 o! C
- local machine, this came with my MySQL install.
$ m. t5 t& l; @- ]. ]+ Z, f( R8 Y. v - These instructions will not tell you how you might transfer your data from the& `. Q# _: o" p9 `2 S- c
- SQLite database to the MySQL database, we start with a clean and empty MySQL3 M& z* ]1 f u2 U2 Z( P
- database.5 f3 l/ Z) g9 j7 }; _8 N" B# t
- Some users have reported ways to import a SQLite database into MySQL, but at& t4 e: M+ j( a: C- D) `# B; ?- S
- the time of writing, there are still too many issues - check the current status2 e4 a/ @8 X- W( [- H
- in the TeamSpeak forums if you are interested.8 O' n* d) C' {+ I- y: J
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* z0 J( L2 N4 h/ o8 N( U# i8 q: D T
- Borland was used. This driver can only interface with the client library that $ i9 n' N+ V' D
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this$ I p1 `! l6 e8 `: r/ k
- client library - basically all you have to do is to use a 3.x client library as 3 r, X8 s0 Y }- i
- "VendorLib" and a 4.x database to connect to.+ s- T- k, Y' R& S, p, O7 J1 M
- If you need more info about dbExpress, you can contact Borland.+ ]9 K7 J3 m4 a) o4 i; U: o
" q& ~# b5 R: Q! P- ### Doing the work ###) Q3 H- h d, X& i1 m) |
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: F# g- k' B7 t1 |& A
- the perquisites right, just open your server.ini file, and add this section at
% A$ s! |$ w0 M, K3 ] - the end:/ y0 I7 S: ]& H3 R9 g' Y( _
- ---cut here---; ~' D+ S4 _9 `) e
- [DBEXPRESS]
8 a) F m5 R4 ^4 A - sqldir=mysql_sql# y3 w+ \; C# Z J& e
- Drivername=mysql
' v7 [7 J* w! C - Database=Your_Database_Name_Here7 d+ Q/ @, X6 q& P
- Hostname=The_PC_the_MySQL-Server_is_on4 m; w! Q9 u. H9 `$ T1 [
- User_name=User_name_on_the_MySQL-Server
; D' \, v( o; d' m; u8 {) m - Password=Password_to_go_with_above_user_name
3 Y) k) p R0 e1 x - GetDriverFunc=getSQLDriverMYSQL- H) z3 m; v9 ?( e
- VendorLib=path_pointing_at_your_mysql_vendor_lib
4 M% E) _9 a3 S' `# G4 G9 }& {& ?! h - LibraryName=path_to_libsqlmy_libary
3 Z \ ]8 C5 _3 z$ [) b/ C% ~ - Active=1
6 V3 @6 J/ e2 I: K' u - ---cut here---
: R1 x/ A2 h6 }- J/ d/ n& z - In my environment (a linux box with a MySQL server running locally) I have:* i; @; K! ] i. h+ _8 ?9 Q
- ---example---+ @% F, G9 h8 L/ T, C3 a
- [DBEXPRESS]; Z' o: p8 y0 P$ G
- sqldir=mysql_sql! V# K- k1 c& [3 j
- Drivername=mysql
$ Q' M/ ^+ P8 G% s* G! [0 q - Database=test
" i8 c; {! P6 F0 K9 R# r5 E* u - Hostname=localhost" i8 y2 }$ D3 K! @9 ]9 L
- User_name=testuser
! m5 f, }5 S" O$ l" Z. s' q - Password=my_password
$ P: N6 Y9 K( n/ E7 j - GetDriverFunc=getSQLDriverMYSQL
$ J# x. i! U2 N+ S3 e" X- K r5 Y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, {9 Z: y: [6 o" V. L1 ]
- LibraryName=./libsqlmy.so
" `2 v& k( @" p6 y/ h7 ~ - Active=1
! i0 Z3 T+ \+ l$ z8 q: g7 z - ---example---
# C2 p; X7 y; x/ Y& M - ! ^3 A. e' L: o0 a/ k% B
- On a windows box, also running the MySQL server locally, it would be:
2 `, D: C5 T+ c* t+ ]* R - ---example---
$ a7 E6 `! W2 j - [DBEXPRESS]9 G) M7 }3 ^# p7 \6 f4 N
- sqldir=mysql_sql, y" ~4 R. {7 o7 U, u; ]
- Drivername=mysql/ p; Q* d! O: ~+ p
- Database=test5 Y, e, v) r! E+ g2 g
- Hostname=127.0.0.11 Q! f* a( V, ^" x* z
- User_name=testuser4 o* |0 e$ R- x g
- Password=my_password
: ]8 l! x N6 `. y( @1 }, O - GetDriverFunc=getSQLDriverMYSQL8 r; t5 I( e! R1 f
- VendorLib=libmysql.dll
4 u1 P4 v( E, \0 l7 M - LibraryName=dbexpmysql.dll
( {8 R! g! v9 V. s8 O% T2 ~; S - Active=1% Q6 k# A) [- {# ]( I
- ---example----
6 }% |. B4 G* c# v; A+ | - - written 02.03.04 by pwk.linuxfan
) v) g" i7 m6 e, c7 w; } - % K1 \( j. ^7 ^: @
复制代码 |
|