|
|
麻烦翻译一下,下面这段文章:xhan
9 T4 Q# m" p5 @* J& U) W' k9 P" K5 x0 l5 m( a
-
c8 t) p$ @2 y6 t7 s J - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( w* t5 f# C6 P3 `6 |7 A
, ^$ H- L4 @- q9 J/ U! |- ### What we need ###
; ^( k& K; I9 F6 |7 B - Naturally, we will need a MySQL server to store the data for us, this document
% j) {3 R. ?6 ], F a - will not explain how this can be done - there are documents out there for the ' r3 ^+ f# w5 `) u4 d3 B, ^
- interested. The requirements include a (empty) database for TeamSpeak to use
* E" r+ ?, `; M2 M0 E! s, N - and a user account (username + password) that has the permissions to do stuff
) x: L9 i, d: l& b* Q) [ - with the database. Additionally, you will need a vendor library installed on the3 v+ Q) j7 G: x$ c$ R( u" m
- local machine, this came with my MySQL install.5 ~1 z1 E; {& a; c5 Z. Q5 K c/ y
- These instructions will not tell you how you might transfer your data from the
) `0 I4 H* N- c, l2 q( k) B - SQLite database to the MySQL database, we start with a clean and empty MySQL
# n$ r! S3 G2 }% _- [; F/ ? - database.! t! r4 j- ?- ^4 i4 l! O2 U
- Some users have reported ways to import a SQLite database into MySQL, but at
- X$ |! B& e, h) R - the time of writing, there are still too many issues - check the current status @- G/ m8 R; f. ?7 j
- in the TeamSpeak forums if you are interested.( `: X1 t' t8 [' M
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 i/ g; U% l) [5 {, f; t - Borland was used. This driver can only interface with the client library that
# `. b: [( m1 v2 L7 t# n - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 C5 A1 R! t7 L
- client library - basically all you have to do is to use a 3.x client library as
9 R. N8 p% i. h( `6 T - "VendorLib" and a 4.x database to connect to./ ]* {7 R( B* ]/ ?- g, _0 f
- If you need more info about dbExpress, you can contact Borland.3 C9 W% s! W# X% Q: `
- # l8 J0 J* p |7 Q2 {
- ### Doing the work ###
2 o _ S/ O E8 j, ?. I7 V; I# F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 S/ `+ d, C8 |6 y6 q8 m, l
- the perquisites right, just open your server.ini file, and add this section at
, `6 ?/ i- ]! H- \ - the end:
# i. g# ]% b8 g) S' S/ L( u+ S7 K - ---cut here---
8 Y) ^* S- y" |1 n, P1 D - [DBEXPRESS], X- y" L5 j( Z5 q4 K6 r! V5 `' G j
- sqldir=mysql_sql
2 w/ @$ V( [6 T: K0 c( t, A5 } - Drivername=mysql
8 `& V! }' {5 a- ~( a9 h - Database=Your_Database_Name_Here6 l( A9 d$ @4 @" A" o
- Hostname=The_PC_the_MySQL-Server_is_on2 ^0 M5 x, [7 X1 h0 ?: }
- User_name=User_name_on_the_MySQL-Server
$ {9 N& `- e( p, @1 t U- f* e - Password=Password_to_go_with_above_user_name* P# }' z# R% m- @3 v) o U
- GetDriverFunc=getSQLDriverMYSQL" U. N9 v0 j! J7 G/ u# W
- VendorLib=path_pointing_at_your_mysql_vendor_lib% Z! w$ A( f$ ~& G+ m! L
- LibraryName=path_to_libsqlmy_libary* s& x4 ^+ z# Q
- Active=1# w+ f C+ N, Y/ }( ]# d
- ---cut here---
1 D$ c; a6 J/ `4 t0 K" ^ - In my environment (a linux box with a MySQL server running locally) I have:
( H( o: { N; p - ---example---
0 \; P, s/ a+ I+ W- U. e+ _ - [DBEXPRESS]* K5 z1 x8 M4 P( ~2 M# U S/ c+ p \
- sqldir=mysql_sql+ g( \! [- M! \7 t6 A% w% c
- Drivername=mysql4 Z7 P- m: \; C' T5 X
- Database=test @. P$ L1 j# T) ^. I2 F5 b6 @6 y
- Hostname=localhost
H- u! n" G+ o* r - User_name=testuser) V8 F- c* t0 o0 k6 w3 U
- Password=my_password* ]1 u! a7 [. B" K# R9 M/ a9 U$ N
- GetDriverFunc=getSQLDriverMYSQL+ U% ]: g4 D& v, k* X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; c/ J( c P1 [; p! E7 I, `# n
- LibraryName=./libsqlmy.so+ M8 o, L M. ]% M3 q2 ?* B
- Active=1" d4 a" S- |& o8 K3 R
- ---example---
. c/ S- R, Z! s; ? - ( |5 g8 l9 N- r9 C
- On a windows box, also running the MySQL server locally, it would be:
' D/ |! q" J7 w: O7 u - ---example---
+ Z2 a& ?/ t' B% Y4 L: d - [DBEXPRESS]3 ?0 n( w) B1 v6 w
- sqldir=mysql_sql5 S0 k! a$ t( g3 @ ]8 ?& T; A- o
- Drivername=mysql% P) S' w& F9 w2 v0 c
- Database=test* ]( N+ u5 p& d! o# }- V! f, `
- Hostname=127.0.0.1
2 n0 m5 c' W" n" l* A, j - User_name=testuser' o j+ q3 Q) W8 U
- Password=my_password
- F: N# _4 x( X" ~ - GetDriverFunc=getSQLDriverMYSQL; u6 G3 o/ y. Q+ P9 g& K. E, J
- VendorLib=libmysql.dll
( t3 g% K3 L5 y0 F - LibraryName=dbexpmysql.dll; u* d9 U9 ~# n0 b$ v3 M8 s
- Active=1
! U, c3 j3 R; `" x4 q - ---example----
! e& {4 q; [: m k3 H: W - - written 02.03.04 by pwk.linuxfan
2 U' `6 Q4 r, Y# g
% p0 @5 |/ Q# p! o$ ~% d
复制代码 |
|