|
|
麻烦翻译一下,下面这段文章:xhan
3 U" _6 G. P4 w' g; n: [7 u7 u$ [# L
-
' u0 W5 K% M. |7 v( b - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 j1 h) a- _3 ~6 p9 _6 b
7 ]7 Q# {* N; L( {+ B- ### What we need ###, n/ e- B$ G, i0 q0 X4 ^
- Naturally, we will need a MySQL server to store the data for us, this document
; Z( l! Q# u" `% R* F - will not explain how this can be done - there are documents out there for the
5 c! X$ ]$ U5 N0 p e" g - interested. The requirements include a (empty) database for TeamSpeak to use. D1 s' [7 T, h
- and a user account (username + password) that has the permissions to do stuff1 s, P3 t" B: E, V* F1 p8 p7 @0 \; L
- with the database. Additionally, you will need a vendor library installed on the
' g+ p }( b! B8 ?& f! s( P: g - local machine, this came with my MySQL install.
2 q7 I5 ~9 G; O( b - These instructions will not tell you how you might transfer your data from the
6 _: y& f3 G- b8 ^& d- @! I$ S( B+ p - SQLite database to the MySQL database, we start with a clean and empty MySQL
! H8 g6 b- d$ I. T - database.
" N4 _: J% g) J; O3 ^7 Q - Some users have reported ways to import a SQLite database into MySQL, but at7 f% t5 e" F* D5 T. a& g' q# k
- the time of writing, there are still too many issues - check the current status
; P- d) N, k' h' i - in the TeamSpeak forums if you are interested.
9 z/ B) w% J0 j2 \0 J - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 f3 v. J P3 Z - Borland was used. This driver can only interface with the client library that ) @8 l: ^( K+ x) B. D" M& `3 Q, x
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
! C" {8 D# D, _- B; T# ~+ H - client library - basically all you have to do is to use a 3.x client library as
. ?% v; d2 |7 u8 H+ h/ D8 E - "VendorLib" and a 4.x database to connect to.
" h9 w" e+ @% ?$ U - If you need more info about dbExpress, you can contact Borland.
% N! W, l/ h+ k W* g. \ - 4 I$ T0 e& |; w
- ### Doing the work ###
7 }0 d( w, F3 U# t8 K" r - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
; {6 J g4 r: S: t - the perquisites right, just open your server.ini file, and add this section at
7 g: h/ x8 J: w5 Z/ q - the end:
6 G3 w. H9 B. b" x+ ^" k - ---cut here---) Z* B% X5 Y. q3 [+ c
- [DBEXPRESS]
' H" A# S. ~( G% y- ]+ F* d! t - sqldir=mysql_sql+ |: f a/ ^$ P/ o4 O* R6 c" R
- Drivername=mysql7 v7 P. [7 [ I- z+ @8 s/ f
- Database=Your_Database_Name_Here
' t) R3 P1 @7 o$ s" l5 T( T - Hostname=The_PC_the_MySQL-Server_is_on0 t8 ~: @( F+ Z2 c& o. ?
- User_name=User_name_on_the_MySQL-Server
0 M% {' D. P) `6 J: a - Password=Password_to_go_with_above_user_name! \( s3 A: l% {. B
- GetDriverFunc=getSQLDriverMYSQL
: N8 F9 I6 ]6 s, e1 [# ^ l; A+ t2 x - VendorLib=path_pointing_at_your_mysql_vendor_lib
6 \7 {8 ?* p7 M9 K+ H+ | - LibraryName=path_to_libsqlmy_libary! \2 E/ _8 {" j9 j( d
- Active=1
+ a/ z# f! O- f5 k- M- M$ J - ---cut here---
' k0 w _8 k9 x: ~$ p0 V1 @3 B - In my environment (a linux box with a MySQL server running locally) I have:/ x x- {# H' J& ~' Q7 w: N8 A) q3 e
- ---example---8 W# I- ^% O3 m/ M
- [DBEXPRESS]
' v/ A0 J5 W( ~$ c& q w) } - sqldir=mysql_sql
1 {: U3 H$ _$ R1 y6 [' p+ o, z1 t - Drivername=mysql
7 N t( N* H! C6 U% F* p$ d, j - Database=test: H$ M3 B( f) g! m0 ]/ }$ ?
- Hostname=localhost
1 E2 Z& d G. ?" X' f! H, w - User_name=testuser
$ Q' E$ g* w! R+ Y+ B; k2 @ - Password=my_password
9 s. R; F. }. G; A; {0 h8 l - GetDriverFunc=getSQLDriverMYSQL
5 X ?% d8 v) r( }! i - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; ~$ ~5 W+ k4 n6 T - LibraryName=./libsqlmy.so* U3 {/ Q+ U* [+ }& v" W
- Active=1
9 ]9 P! L X5 ~, W - ---example---
( k. T$ f/ B% N/ ? - * o! Q7 w' [* W O% L* B5 x4 F$ y ]
- On a windows box, also running the MySQL server locally, it would be:
( D4 c% l0 U) g3 R- |' _+ \) i6 @# T7 j - ---example---# V' a5 e& b) C/ j% l
- [DBEXPRESS], X: [; }* a6 |1 N6 P
- sqldir=mysql_sql
! y M, {0 `( j. D2 X- ~+ ~* [ - Drivername=mysql8 j% o L% s' K& u" i
- Database=test
) C2 ]. {6 D W4 |: s+ H3 u- A - Hostname=127.0.0.1, o: A6 B- p* b* v* n: D: e
- User_name=testuser* u; \9 }! o9 G# u
- Password=my_password
% h, O; V# _5 G- w - GetDriverFunc=getSQLDriverMYSQL
! g' e; c1 ]. s - VendorLib=libmysql.dll$ Y) I7 }6 k9 V5 P
- LibraryName=dbexpmysql.dll2 z5 L: k" k( n$ _. w2 }0 v
- Active=1
$ G, q: U* G0 b - ---example----
5 [9 r8 `" K9 K - - written 02.03.04 by pwk.linuxfan' p0 j% ?' _+ n
& j/ e/ p8 l. }5 G, O k
复制代码 |
|