|
|
麻烦翻译一下,下面这段文章:xhan 8 e$ m* L0 H3 w! j: w
6 ]3 n5 e0 x8 A( f% @2 o- d+ [0 C
-
7 X( D2 A6 n2 i& e4 S - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( a( X1 U# V- W7 L+ E3 y9 I) F5 O
" i" n6 p% e0 E: w. k% u7 Z5 j- ### What we need ###
6 a3 I4 j' K+ B# Z, L - Naturally, we will need a MySQL server to store the data for us, this document
) ~5 m& @! a6 {" j: ^2 a - will not explain how this can be done - there are documents out there for the
7 L6 k7 q" G+ |5 N4 V$ Z4 N, | - interested. The requirements include a (empty) database for TeamSpeak to use. p2 v( ?( C- e) \& o5 \0 \
- and a user account (username + password) that has the permissions to do stuff' j5 }7 K. k( q
- with the database. Additionally, you will need a vendor library installed on the
' Z; x2 s7 c6 }' v4 w& F e) C - local machine, this came with my MySQL install. O4 a) g% q3 V
- These instructions will not tell you how you might transfer your data from the/ _3 _: o! K# g$ ^& t
- SQLite database to the MySQL database, we start with a clean and empty MySQL) f! m. j% ?# t% v( Y) n" @1 L
- database.
3 r& r+ R: ^8 ^- o! Q - Some users have reported ways to import a SQLite database into MySQL, but at
6 X* f8 }5 c% _- @ - the time of writing, there are still too many issues - check the current status. j6 b0 q, c G+ S8 M; u% j
- in the TeamSpeak forums if you are interested.0 k) |+ @! `/ H# Z; {' t4 Z
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
! j: q/ {& D; C+ }3 E - Borland was used. This driver can only interface with the client library that - _0 a" t: g5 {% N% k
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this* F3 ^, F9 O, c
- client library - basically all you have to do is to use a 3.x client library as
; L7 }+ X( u p6 d7 O - "VendorLib" and a 4.x database to connect to.2 m/ S+ p+ M6 K# G/ y$ K% ^' a
- If you need more info about dbExpress, you can contact Borland.
: d, q: h6 j/ y* u
9 U3 C* [. c' b/ q) {- ### Doing the work ###
3 R2 F% _4 n" V1 }/ g. R - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. Q6 _! q9 W. x. g, V3 V: i0 b - the perquisites right, just open your server.ini file, and add this section at
, q2 J5 M4 {0 N - the end:; G- h) m- V5 p" a& o! k" F
- ---cut here---' @4 J! K0 {4 g! B
- [DBEXPRESS]
7 F3 C1 e6 @# ]9 e' M1 d7 e - sqldir=mysql_sql+ F' I6 @! a" G2 S o
- Drivername=mysql6 V1 t7 P) ?3 g6 F6 f; l0 s6 p
- Database=Your_Database_Name_Here" c) p2 R1 h0 T3 j. r9 `
- Hostname=The_PC_the_MySQL-Server_is_on
, j0 y4 p- x$ e0 }8 L" A3 s - User_name=User_name_on_the_MySQL-Server
' @/ m# J8 f- ` - Password=Password_to_go_with_above_user_name
" D2 t( s. W; j, ~8 w! t* U1 h - GetDriverFunc=getSQLDriverMYSQL
1 `+ }9 c+ |) b - VendorLib=path_pointing_at_your_mysql_vendor_lib
# K0 ?: {9 O h6 K/ z8 v - LibraryName=path_to_libsqlmy_libary
: Q$ V; [7 ?, u - Active=1
3 s) l/ v8 T+ N/ S0 z - ---cut here---- a7 {8 g) A% f4 g! w; J
- In my environment (a linux box with a MySQL server running locally) I have: `* a! Z, Y' Q' `% X! q
- ---example---
% M6 b' _8 B* l5 \+ }$ r - [DBEXPRESS]! q$ f# x) l8 W( r
- sqldir=mysql_sql4 Q! i+ a2 \6 U
- Drivername=mysql
* {9 z$ d) i# n+ T3 H- `- H: d - Database=test
# A/ c& f R' y* v, S. h% B# s r8 _ - Hostname=localhost
, h6 V7 v7 E9 ~1 F& T - User_name=testuser
. B; {: l# r& L1 ? Y - Password=my_password
) a$ o! E- W, W8 N; X( p4 _ - GetDriverFunc=getSQLDriverMYSQL4 P, h2 X5 L# I
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0' x$ o) t- k* P) ?) @: I
- LibraryName=./libsqlmy.so
# f/ h7 n5 w3 I7 O( Z - Active=14 G+ p) q7 i e* F
- ---example---
1 I8 }: N* ^( F+ h
* p C# [8 v6 p8 U: g" x2 ]- On a windows box, also running the MySQL server locally, it would be:8 L, ]; R: @# H& \
- ---example---
7 I% U! @3 h3 q+ v* D6 y+ @ - [DBEXPRESS]
! z8 G" w5 ^# V; _" l5 C; M - sqldir=mysql_sql
1 g. ]4 L! t* F/ y* n - Drivername=mysql9 g" F( A G4 p' D9 x
- Database=test+ l2 K, N* W( @$ h& k8 s
- Hostname=127.0.0.1: |# r" d2 _' J( s: N& m% h( Y
- User_name=testuser
* Z+ D2 P5 c, \) c! x( g - Password=my_password
; J `" ~+ F" q1 j. @ - GetDriverFunc=getSQLDriverMYSQL! z; w& Z5 I6 Z" q( N
- VendorLib=libmysql.dll9 Z4 F9 | V* q8 J
- LibraryName=dbexpmysql.dll
1 [8 _& q# `# v$ G - Active=1
5 x5 U- Q; R. z! J# i - ---example----
6 e5 {1 {% |3 c, T4 x% T; n - - written 02.03.04 by pwk.linuxfan1 w% r, \3 C0 I( |. R) _
0 I2 T- M/ L, B; n, G
复制代码 |
|