|
|
麻烦翻译一下,下面这段文章:xhan ; m0 z( ^# B! [
" d/ t/ a7 s7 |3 ^/ Y% t
- 8 e p; z' F. _( O
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. Z6 S# G- o( A* L w
7 O( s; s0 I+ G$ ~% i, f- V- ### What we need ###
7 y6 x% s5 Q( d- w$ ], V8 { - Naturally, we will need a MySQL server to store the data for us, this document ; Z2 w. |6 w' B( H
- will not explain how this can be done - there are documents out there for the & F( W3 K0 D5 m% U: k2 a: y& _
- interested. The requirements include a (empty) database for TeamSpeak to use+ S, Q T- `: z' Q) N
- and a user account (username + password) that has the permissions to do stuff
$ f8 f! L; [" d$ Z, T- ` - with the database. Additionally, you will need a vendor library installed on the
) E Q: c0 v/ k9 J! a - local machine, this came with my MySQL install.; P. h0 I# Y0 }# |: Z
- These instructions will not tell you how you might transfer your data from the- B% N" \+ B9 k# E* w# a
- SQLite database to the MySQL database, we start with a clean and empty MySQL: t g: {5 M$ E2 F2 [
- database.# ?& H$ q% c( Y& ]# H
- Some users have reported ways to import a SQLite database into MySQL, but at
& V7 G6 }+ v, q) a - the time of writing, there are still too many issues - check the current status
3 N3 ^, f# X% T: h3 C - in the TeamSpeak forums if you are interested.
5 f- g9 M; q0 P% W2 y - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* d. u/ G% k$ V$ r5 X5 |
- Borland was used. This driver can only interface with the client library that 7 ^& B( ~6 F! U4 ^, G/ K( {' I
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 w2 _% z; |/ C3 w' R
- client library - basically all you have to do is to use a 3.x client library as 5 k4 S' U4 [4 T2 p
- "VendorLib" and a 4.x database to connect to.! I7 F0 w) t U2 W
- If you need more info about dbExpress, you can contact Borland.
3 p3 _: v' X' V! M7 `: i* H+ h - K3 D% B% y' h U2 m9 C/ q
- ### Doing the work ###9 |; G9 D) o4 l8 n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 M9 Y( b9 O% w) k3 L9 ?
- the perquisites right, just open your server.ini file, and add this section at
5 |& _( X8 g" K# M+ M - the end:
% L; O5 r2 C6 x) T3 V) ]1 E/ h# Z - ---cut here---$ `2 V0 Y" ~* j. b0 t: w
- [DBEXPRESS]3 n1 b$ w5 e- G" G) o9 l7 p
- sqldir=mysql_sql. X3 Y/ @1 M1 c3 v! W k
- Drivername=mysql
3 t; d& A$ y. U% i5 q: |+ O2 u; A& f - Database=Your_Database_Name_Here4 N5 O5 E6 K! @2 V
- Hostname=The_PC_the_MySQL-Server_is_on. D7 B: {8 H1 j
- User_name=User_name_on_the_MySQL-Server
% f* W8 w8 k; R4 u$ c - Password=Password_to_go_with_above_user_name+ d3 ]: r9 Z( O7 e- h9 B
- GetDriverFunc=getSQLDriverMYSQL: M% ]! p: z% P
- VendorLib=path_pointing_at_your_mysql_vendor_lib% m+ K2 x4 g; ?! j' Q: O8 ~
- LibraryName=path_to_libsqlmy_libary9 Z/ k2 o$ w! g2 {4 Y
- Active=1' Z1 i- o6 W$ D) F( x+ D
- ---cut here---
' a7 g0 ]; H0 F5 u4 S - In my environment (a linux box with a MySQL server running locally) I have:; S9 x4 u- g% o3 i
- ---example---
; X" D- p* Z% i. h. e6 y - [DBEXPRESS]
* h' ~0 B2 s/ ?1 a7 C, t; [5 L' |" \# ~ - sqldir=mysql_sql
4 f8 D g6 y3 |3 g3 h0 ^ - Drivername=mysql
2 t S: Y) f$ |, g- K0 c - Database=test
" h- p2 ?! V! p2 t* d; R - Hostname=localhost
& J1 P- B/ s [1 p - User_name=testuser3 ?" F& H6 k, x
- Password=my_password, U* q j# N/ a: g8 H4 j) F
- GetDriverFunc=getSQLDriverMYSQL
3 W O: W3 D8 b; F3 R0 C - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 e: T$ j) J, I! W B
- LibraryName=./libsqlmy.so
: k r" L( N) X, O9 c - Active=1
& ]: W/ c" e) E& P8 x - ---example---
5 C( F; @$ ^/ ^) R
9 r# }0 q; b- m) ~4 S+ h9 Q- On a windows box, also running the MySQL server locally, it would be:. k, r- B$ h6 m( Q3 h
- ---example---; n, D% n# ~+ x+ q% Y1 H
- [DBEXPRESS]! O! t6 e% O/ Q8 _9 i, ?7 T8 H
- sqldir=mysql_sql) M' S; t& J" p
- Drivername=mysql
: ~" c: z8 r# ~! G/ [0 t( L - Database=test
, M+ K$ N5 w% a& Q - Hostname=127.0.0.12 I* b& I$ D4 Q
- User_name=testuser
. P& q _ O& n) C - Password=my_password
; m8 r, ]( I. Z7 y! R - GetDriverFunc=getSQLDriverMYSQL. }/ J- S' B' i9 q3 J, G
- VendorLib=libmysql.dll- g6 F4 l+ K. f0 K& d3 C8 B% P: }
- LibraryName=dbexpmysql.dll
; m/ h F" c; G& H, `+ S - Active=1+ x# z( {& T7 ]3 c( S. I* o
- ---example----& R$ h$ f( m4 ^0 Z; }
- - written 02.03.04 by pwk.linuxfan( @7 t( [) c) g9 v7 V/ p
6 {0 W+ c3 A2 V2 X/ A0 o
复制代码 |
|