|
|
麻烦翻译一下,下面这段文章:xhan 1 L3 ^8 M2 C' F9 Q) |- l
; e& t! Q) ]1 o3 o4 R, ] M- 0 o4 m k6 N8 n4 Z! |& x7 U: z
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( a- Y& I8 b! x0 K
# s. T0 e! r9 G, F7 u- ### What we need ###
9 r/ h( M4 U4 N& k) p - Naturally, we will need a MySQL server to store the data for us, this document
: d( `+ d, I" b8 Z- U0 B - will not explain how this can be done - there are documents out there for the
0 y/ e) s2 u# K3 j% P& c2 R6 _ - interested. The requirements include a (empty) database for TeamSpeak to use7 N, B! _# W2 P, L# r; A% g# T
- and a user account (username + password) that has the permissions to do stuff
( v4 Y& j* E! | - with the database. Additionally, you will need a vendor library installed on the
: \. R5 E% r* u - local machine, this came with my MySQL install.
* ^! A! ?$ X, K# \5 n6 p - These instructions will not tell you how you might transfer your data from the# i6 c: V1 C& V
- SQLite database to the MySQL database, we start with a clean and empty MySQL/ a" g: i H" j( S6 S) R# G
- database.- Z( {( u! O, P
- Some users have reported ways to import a SQLite database into MySQL, but at
- U$ w) [4 @2 ~, b" b - the time of writing, there are still too many issues - check the current status% J; J" k/ B4 _+ V) `' N) X6 O8 l, E
- in the TeamSpeak forums if you are interested.
# t- r# ^7 q: b - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 h- G: }1 O P/ Q
- Borland was used. This driver can only interface with the client library that
9 `+ q( ~. D4 s5 b$ I - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 `8 r' ^9 h0 ]9 x! j# y+ B3 ? s - client library - basically all you have to do is to use a 3.x client library as . [+ o( _" {. S: F
- "VendorLib" and a 4.x database to connect to.0 d$ E0 Y2 B: L# _# i4 e
- If you need more info about dbExpress, you can contact Borland.; n* q; Z8 n( c
- # L u2 f. b6 f" @6 ^+ c: i
- ### Doing the work ###
1 q6 f" K# P' X0 _! E - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 s6 `( p3 ]6 ?* \( D q* t! g - the perquisites right, just open your server.ini file, and add this section at) K8 N }: Q% d+ ~6 ]' ^# G& t
- the end:
& x& U+ j$ a/ ?8 h, i$ B; U5 q - ---cut here---
* ^4 i& z$ z" o. A9 ~* r+ L - [DBEXPRESS]3 y5 h3 \. t! `: _
- sqldir=mysql_sql
' k7 e/ }% l8 ^7 X! A. O4 H# ~( I - Drivername=mysql
' B1 I( b8 J6 f& L% q" W! | - Database=Your_Database_Name_Here, K. S7 v! z3 `9 o
- Hostname=The_PC_the_MySQL-Server_is_on
+ G' D9 r; A7 I2 _, n: Z& Q8 I, n - User_name=User_name_on_the_MySQL-Server8 D' n2 r7 h( |9 S
- Password=Password_to_go_with_above_user_name
0 f3 |, X' b8 k* e - GetDriverFunc=getSQLDriverMYSQL
) w- Q o# s8 w0 \; `+ N3 t - VendorLib=path_pointing_at_your_mysql_vendor_lib" Y% H$ w- l* {. ? U( q5 f5 ]
- LibraryName=path_to_libsqlmy_libary5 P0 k' g# i9 i
- Active=1
2 f) O) y- s% J# b1 q2 C - ---cut here---/ I5 a2 S, Y, i1 R- x6 X0 ?9 f/ H
- In my environment (a linux box with a MySQL server running locally) I have:8 k0 @ N* g: c; ~
- ---example---1 C4 i' \6 y4 U2 K( d4 g
- [DBEXPRESS]% y) ~7 Z6 P. R4 z& A! G
- sqldir=mysql_sql
1 X1 V4 ]- g+ M+ D% }2 u - Drivername=mysql9 k _$ }9 F+ ^* Y
- Database=test5 L7 o! g7 }# Y( E ?0 X" V* f% c
- Hostname=localhost }/ z5 a$ u8 u* M) }5 p7 p
- User_name=testuser; j5 w/ p. o, y
- Password=my_password
) v3 G( P* v- P O" j2 I - GetDriverFunc=getSQLDriverMYSQL6 \$ C0 } o, A; |- W( s) d
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 o1 D Z, ?3 i) {+ K - LibraryName=./libsqlmy.so U: N$ l/ c. n% N! @
- Active=1
9 G$ A( [; X E# Q' S4 b* ] - ---example---
0 U, O) V; A! O8 W* ~
4 w1 z. x, X+ b3 ~- On a windows box, also running the MySQL server locally, it would be:; I& q: l% Y0 \7 H$ ^
- ---example---
. }* A+ f0 E5 N( Z. k' ]$ T - [DBEXPRESS]. `0 G+ a% C* `$ C, g
- sqldir=mysql_sql
5 C/ c! h' o$ G2 E \ - Drivername=mysql
/ i* _" E1 ^' k' |; o: m - Database=test
v; A3 {/ X+ d+ D4 X- { - Hostname=127.0.0.19 |* s9 P) Q7 Y. P; X
- User_name=testuser9 C& h% G( {+ ?4 A2 B0 }
- Password=my_password
% K1 w6 |) {( C7 z - GetDriverFunc=getSQLDriverMYSQL/ x0 g( A4 Q" Z- b% h( ^. L( N
- VendorLib=libmysql.dll& N7 ^4 Z5 g! {* D6 B- J, E
- LibraryName=dbexpmysql.dll* t; A0 m* d. s7 r/ d( U
- Active=1
* J' ^ y1 H' I; r1 | T7 u9 N, @ - ---example----/ U& U; O& W9 O& B) B! L
- - written 02.03.04 by pwk.linuxfan
: Y3 D% L, ]. ?3 x - # P, T0 G8 a5 v3 {: _
复制代码 |
|