|
|
麻烦翻译一下,下面这段文章:xhan
% _" T8 X/ ` P" @* w, t, [* J; m
1 F3 P: k7 ~6 d' G2 \; ~; R-
# ]0 t! u% j9 @. n: | - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 r5 ?# G" r- F# P( T
# [- R' u/ b. f( e# [. j. _- ### What we need ###
4 k% u1 s: E. u! d+ W& f - Naturally, we will need a MySQL server to store the data for us, this document
" N0 H% X/ O. p# T - will not explain how this can be done - there are documents out there for the
0 z/ L8 H4 @3 |, p - interested. The requirements include a (empty) database for TeamSpeak to use. v# p0 K. y* T( f' o# S+ v
- and a user account (username + password) that has the permissions to do stuff
. w, v3 Q5 e2 Y9 f0 n - with the database. Additionally, you will need a vendor library installed on the
6 l# k! N6 p: e- R3 C% { p0 N - local machine, this came with my MySQL install.8 A- b6 J9 s+ Y
- These instructions will not tell you how you might transfer your data from the
: k# @ W4 p- _ - SQLite database to the MySQL database, we start with a clean and empty MySQL
; t5 D! F* I; t3 y - database.) U% n, H8 Q$ _+ o4 t$ X0 _6 @
- Some users have reported ways to import a SQLite database into MySQL, but at# V# l6 |' y: b2 H. N, T) c
- the time of writing, there are still too many issues - check the current status2 u$ Q5 w+ O9 i U% d7 h; j
- in the TeamSpeak forums if you are interested.
' p x3 t/ a, Q, U- g - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* t" P& E N! B: L
- Borland was used. This driver can only interface with the client library that + o6 F2 I* g" R( x' y4 [! X
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this. H) S4 V! ^2 b5 u' m
- client library - basically all you have to do is to use a 3.x client library as
/ n- _+ ?* t: g2 z) d0 d - "VendorLib" and a 4.x database to connect to." r+ o% V7 O6 ^% `3 M
- If you need more info about dbExpress, you can contact Borland.# G$ `8 T. e4 B! ]6 ~
. l5 c+ f9 z' ]- S- ### Doing the work ###
2 z2 Z: Q& q# ^; ~5 {" k; ^ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all. J+ |! S! ^$ }' ~, J6 b) }
- the perquisites right, just open your server.ini file, and add this section at
0 O$ H; }9 y5 w$ T6 X% ?- z! o% d - the end:$ Z* v0 {' D, t/ k
- ---cut here--- d8 p2 J9 i% A
- [DBEXPRESS]
) f$ N; j* u) G! q - sqldir=mysql_sql
& R3 E9 j* I0 P* _( ]# i - Drivername=mysql' W5 e# g7 y0 q
- Database=Your_Database_Name_Here
4 y% h( A& N6 S, b6 l( K7 ]2 t - Hostname=The_PC_the_MySQL-Server_is_on
2 _% i7 v& s* c8 F7 d) O+ z - User_name=User_name_on_the_MySQL-Server$ `/ D4 W7 t6 N5 M% Q3 }- m
- Password=Password_to_go_with_above_user_name- @7 k! v/ ]; `( F
- GetDriverFunc=getSQLDriverMYSQL4 `- B: q5 g6 {+ K# T9 _
- VendorLib=path_pointing_at_your_mysql_vendor_lib
* g2 ?7 S* ~- E6 s - LibraryName=path_to_libsqlmy_libary, a! u. a$ w. V) }
- Active=1# i' _" | Z9 o+ d* X! g9 t
- ---cut here---$ z8 \3 p" A7 g3 Y& p2 e6 t
- In my environment (a linux box with a MySQL server running locally) I have:2 U/ @; Z, G g% y3 J! a
- ---example---
5 W4 m! ^4 y$ A) p& b( T3 d) I1 }; B - [DBEXPRESS]* a: I9 y& ^- x
- sqldir=mysql_sql
- W4 z# P! p D. q ~: M4 W# W - Drivername=mysql! _7 T( \4 A. V" L, |4 v) u
- Database=test
) H( }6 B7 h& M# f9 ~( J2 P - Hostname=localhost g0 x* ]4 D5 N& |$ X5 }$ n% P
- User_name=testuser
6 l- m# p6 n' G% T( d# h! l6 \ - Password=my_password
, q- I. C& z4 g, f& h - GetDriverFunc=getSQLDriverMYSQL
3 x* T: R. {& e; A* s9 W2 S7 j - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
$ L1 R; H3 d: H8 y- P, O1 N7 K: b - LibraryName=./libsqlmy.so
5 u% m) {7 R5 {! O1 ]* f0 i - Active=1: p# _0 U( u A) l$ e
- ---example---- ]" H( r1 g+ S$ K, q
! d$ z9 w5 F5 J4 o- On a windows box, also running the MySQL server locally, it would be:6 b2 M2 u. T% O5 a
- ---example---$ b* H% R' {: _. ^
- [DBEXPRESS]
- P9 w H0 w% v0 L) H8 z - sqldir=mysql_sql
+ g' Y% k( W1 T* S; m6 q - Drivername=mysql
3 a& J7 B( C# V- I& F- Y# W# _ - Database=test; c6 i+ x; i, q" w( P* o5 F; C) w
- Hostname=127.0.0.1
6 U) u% k4 a! o/ b% z7 l% `) D& ^( _ - User_name=testuser/ ^) \5 T& U* \3 M
- Password=my_password9 M4 ?! `2 X; q% C$ b! A
- GetDriverFunc=getSQLDriverMYSQL
* v5 W- w# F" O3 d# Y - VendorLib=libmysql.dll
( J" U L; V( V) w, G* `7 T - LibraryName=dbexpmysql.dll
0 F# } L5 I, N# b3 h - Active=1
( p- i! f/ e) p7 f! i - ---example----5 s) w% p2 B& p5 s, u; z
- - written 02.03.04 by pwk.linuxfan
- O* r: L8 I) M# z1 q$ c0 [; G0 _ - ) P8 E( c8 j& {% c' c- n
复制代码 |
|