|
|
麻烦翻译一下,下面这段文章:xhan
$ `2 S/ ]$ y- L% S8 R7 V8 |1 u! I8 P$ b, p3 [; }! `$ T3 n* g
- 6 y" x: }* M2 Y; Z8 ~5 b
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######* s* `1 |$ `5 h6 C n/ [
4 K3 s* ]# F c4 R# b- ### What we need ###) x, k8 k' N+ H8 l' w
- Naturally, we will need a MySQL server to store the data for us, this document 6 n0 x8 k3 m, d
- will not explain how this can be done - there are documents out there for the ! I* H: g4 ]; g9 B4 { [3 K3 m
- interested. The requirements include a (empty) database for TeamSpeak to use* g% j" g0 U O" n, Y
- and a user account (username + password) that has the permissions to do stuff3 q# Y* {9 R! V/ E% n
- with the database. Additionally, you will need a vendor library installed on the+ g8 z3 X9 r" g3 O
- local machine, this came with my MySQL install.
" f5 W! M& R. e& e3 O# P - These instructions will not tell you how you might transfer your data from the) a8 K' i% b7 A9 V1 Z
- SQLite database to the MySQL database, we start with a clean and empty MySQL5 X8 ]" `9 `: S; j6 p9 F
- database.
! a7 Y4 ]; m0 k& K3 c' z4 O0 n - Some users have reported ways to import a SQLite database into MySQL, but at
' Y6 n& T! H+ O1 w+ c - the time of writing, there are still too many issues - check the current status# j/ n L& P/ r6 ~% q- V: w# g
- in the TeamSpeak forums if you are interested.2 p; ~- [. `' h5 c2 g) ^* ]& O6 {
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( n+ A' q2 ~7 w0 A2 J: c u; D - Borland was used. This driver can only interface with the client library that 6 q5 O+ |: n+ i0 d: {
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; Z* s) u+ f) ^4 e$ C
- client library - basically all you have to do is to use a 3.x client library as / w% C4 X3 ]- O, e
- "VendorLib" and a 4.x database to connect to.
# F3 o K& v! H' r - If you need more info about dbExpress, you can contact Borland.9 `% Q0 l7 b2 M9 B0 L
0 S5 a1 g) q8 C- ### Doing the work ###) O; u) w4 }, |/ D0 {. O8 ~' D
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
2 j8 R2 C4 j# t/ x - the perquisites right, just open your server.ini file, and add this section at
3 s3 X2 O1 |% w; ?& T1 I* x - the end:
/ B. n: \- {# Z4 ? - ---cut here---
4 [) l3 M8 _7 f# | - [DBEXPRESS]5 I) Z1 _ c1 j- @" _
- sqldir=mysql_sql
6 F$ K3 f4 \8 ?" ]; ` - Drivername=mysql% I8 m' X' v) }
- Database=Your_Database_Name_Here
" s2 W6 g: r. H6 s$ L ?3 ` - Hostname=The_PC_the_MySQL-Server_is_on
# z4 A( R) V- K; \& t - User_name=User_name_on_the_MySQL-Server
! c# Y( \8 g, D3 w! [0 \! _ - Password=Password_to_go_with_above_user_name
0 y. I" f( B" [$ P4 D7 Z [2 A% W - GetDriverFunc=getSQLDriverMYSQL
Z# ?# r7 g6 h4 o5 }" ]: @ - VendorLib=path_pointing_at_your_mysql_vendor_lib
6 Y. v( ]0 S% L) A6 t! m% N - LibraryName=path_to_libsqlmy_libary* G( e8 z7 U, a+ j+ N
- Active=1& s; M; U' o: g @9 `
- ---cut here---
! S& _ R$ C+ j1 n1 _ - In my environment (a linux box with a MySQL server running locally) I have:
0 _6 j6 v( T1 c* _! G - ---example---
; S R+ n& S; u& w, E& M - [DBEXPRESS]
% t- e: N. _, j8 n$ c, J - sqldir=mysql_sql
6 x, K- b- M0 S. q4 r% v( _ - Drivername=mysql
' n( H' f& i9 T% b: Z - Database=test% F" ^5 ^8 I% _) X
- Hostname=localhost
, E5 }( @& u: l# r - User_name=testuser) x! c8 O2 f8 }2 z+ n' a3 \
- Password=my_password& P! ~% n* t; A4 b6 g+ M
- GetDriverFunc=getSQLDriverMYSQL6 g' I3 N6 J8 d% ] |9 n
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, |4 g3 _6 v- j; y5 ~2 ]; O
- LibraryName=./libsqlmy.so
# d' a# O4 P) p$ e: k; { - Active=13 ]" H& i' A2 i+ J" z3 M9 N" r
- ---example---, H" q( y5 R# s9 [3 T. @ b. }
- / o1 p5 x- l9 s' D3 K- u& J. ]: e
- On a windows box, also running the MySQL server locally, it would be:
' {7 z2 z; o ]% G7 s - ---example---
9 [1 p2 V( Q3 i5 A5 z' m2 l - [DBEXPRESS]) n) Q, T9 V7 `& V5 x
- sqldir=mysql_sql
3 C7 m* s D% ~% b2 s+ } - Drivername=mysql
$ V1 m4 r8 l9 j - Database=test3 z$ V. D9 v5 q
- Hostname=127.0.0.1) c1 O- T1 }$ K& j3 ^7 R
- User_name=testuser8 g+ v, a( b: V# C
- Password=my_password
+ N- k$ _+ {% C+ k4 X - GetDriverFunc=getSQLDriverMYSQL$ x- K( ]% W1 I1 ~. l
- VendorLib=libmysql.dll: p8 F7 s P' \9 l+ R
- LibraryName=dbexpmysql.dll8 S4 M$ D3 G; Z* O' i" M3 r# W
- Active=1# `0 `" @0 N! n+ U$ W5 @3 m
- ---example----
* n9 ~- w& Z m9 R6 S" e, }0 } - - written 02.03.04 by pwk.linuxfan3 a! \# x' m$ Z" i0 ]1 b% W
/ E) m5 U1 o$ o* u9 j$ g
复制代码 |
|