|
|
麻烦翻译一下,下面这段文章:xhan ' @: F! L% A- H, n
3 P" w ?$ U6 {$ H' b8 ^-
+ x! A. q! V0 F1 j6 c' J$ M$ L3 [" Q - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" W6 t+ T3 \6 X# o& N* W - 1 w' F- o# X$ k, X- d6 C
- ### What we need ###
* a( P4 q0 p: H0 ]+ D9 \2 f - Naturally, we will need a MySQL server to store the data for us, this document
& P! K6 j4 Y% O. r - will not explain how this can be done - there are documents out there for the
+ @7 A: F& ~$ X: b - interested. The requirements include a (empty) database for TeamSpeak to use8 A- v2 u; c3 m) D3 y
- and a user account (username + password) that has the permissions to do stuff
& z$ q/ U( \0 P: x - with the database. Additionally, you will need a vendor library installed on the
) u8 X" P3 n+ {# ^ - local machine, this came with my MySQL install.( @1 h8 ^! [ I' U
- These instructions will not tell you how you might transfer your data from the3 ~; c9 H9 p8 I Z _
- SQLite database to the MySQL database, we start with a clean and empty MySQL
# ^% d" _ q5 y2 v% Q& [ - database.5 | t) {$ c( B% Q% |- P
- Some users have reported ways to import a SQLite database into MySQL, but at, |2 p5 m1 w1 T7 ]. B& P
- the time of writing, there are still too many issues - check the current status5 P: X1 d0 F- y$ Y2 m" d. S
- in the TeamSpeak forums if you are interested.8 a s1 O, c) C! y/ G7 H, |) ?. P! n* `
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 N( U2 F: k/ L9 y+ ~ - Borland was used. This driver can only interface with the client library that % O6 z4 h$ w' x) w9 v/ M
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 W7 \) G# A) r1 x
- client library - basically all you have to do is to use a 3.x client library as
# A$ G' P1 _- C. q+ | - "VendorLib" and a 4.x database to connect to.- o6 o0 H1 u8 o, N
- If you need more info about dbExpress, you can contact Borland.2 p+ Q A5 r- ~' r3 w9 o* O
2 ^7 I! s4 s+ x' D8 J; \- ### Doing the work ###* {" ` a' {+ e. e0 |: O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 J) E8 n2 F5 Z) b* L E - the perquisites right, just open your server.ini file, and add this section at1 X* R9 w6 W; ~) f, W; r9 L8 \/ E D1 B
- the end:" [) s4 c8 J# j9 K. F# S$ y5 v$ A
- ---cut here---
2 P1 h% I; F8 }) R - [DBEXPRESS]
* I% |6 z& ?. @) T) ]! N6 m# z# y - sqldir=mysql_sql
\0 ?, E' K o& n. G' G4 C - Drivername=mysql$ n v. _' X; ^0 Q4 {$ @/ j
- Database=Your_Database_Name_Here: Q+ }/ a- C& ]0 {; i& G
- Hostname=The_PC_the_MySQL-Server_is_on$ R) N# ~, C/ c8 K4 k7 x
- User_name=User_name_on_the_MySQL-Server
, p$ S [/ i- U2 {+ s - Password=Password_to_go_with_above_user_name
6 b( H% K, t" \" R: { - GetDriverFunc=getSQLDriverMYSQL
" F# Y) {7 v" _! x - VendorLib=path_pointing_at_your_mysql_vendor_lib
& \$ A# ?+ k- h9 K$ L5 D - LibraryName=path_to_libsqlmy_libary
" u; i- Z# ?- q+ M6 t - Active=1
M6 S6 l, Q# r( C - ---cut here---
7 [# A0 L7 a+ i) { - In my environment (a linux box with a MySQL server running locally) I have:! E4 D P! I# F! M
- ---example---
, G; \1 f6 Q& A1 k9 E4 K3 ?/ _ - [DBEXPRESS]
: Y% N0 k' _3 ?- B7 Q - sqldir=mysql_sql! ~( A+ Y: N+ |/ P5 ]7 Y t
- Drivername=mysql" b% P: Y/ ?) `: q
- Database=test
* C+ w0 Z3 y+ b; q7 B - Hostname=localhost/ x' z* j4 L$ E! ]* \+ ?
- User_name=testuser
3 X4 N6 t- y" ~$ l% | - Password=my_password7 q: n0 ]7 F2 L) H; n4 A3 Z6 S
- GetDriverFunc=getSQLDriverMYSQL" K' T' |9 m, p$ J* r% e( L' ~ Y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, ? X c& N( s
- LibraryName=./libsqlmy.so I8 E- A! V0 H! [
- Active=1
" T& {2 E4 p; y" E4 F - ---example---8 z! w' Q5 X: ~, p7 R
a4 t; D* q# o9 A5 N L" J; E- On a windows box, also running the MySQL server locally, it would be:
8 h) S$ o4 M* A1 n7 P# n - ---example---/ f& ]- F3 B$ Y5 p; {4 |9 o- G! Z" N
- [DBEXPRESS]
1 b- M/ w# ]/ X! n8 n2 a - sqldir=mysql_sql2 q N/ j* j) h% F
- Drivername=mysql2 p/ @+ n* n' R& @
- Database=test
! @3 i m9 Z. v5 A - Hostname=127.0.0.16 g8 @; f* W* F" C8 N! F( B
- User_name=testuser
5 M6 @# Z: g* W3 v' K. X& ? Q - Password=my_password0 L2 f6 d" z" O1 ^. o
- GetDriverFunc=getSQLDriverMYSQL
8 x2 B+ b3 q5 u7 ^, p! K9 Q - VendorLib=libmysql.dll: v- b) l( U7 h6 y# W6 N
- LibraryName=dbexpmysql.dll
9 D+ d) U% S y: X" L5 ]4 W2 u - Active=15 P' P% s( f7 l& _( i
- ---example----( m) B, x8 ] {- h
- - written 02.03.04 by pwk.linuxfan
+ ?. `2 `( Z2 Q+ D5 B - 2 G* Q ? C: x% A# m' y- @
复制代码 |
|