|
|
麻烦翻译一下,下面这段文章:xhan # e3 k1 p8 q; v
) k/ n7 L4 T4 F* }
- 2 d- S" P: F1 P0 t- Y; _& A
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" }9 g, \2 \- k( ?7 R/ F - 8 _8 s) L+ X) t/ n0 f) W' {& M
- ### What we need ###
' `5 X( o, U& ?8 d5 T# P4 N# d - Naturally, we will need a MySQL server to store the data for us, this document
: H, E) {: c$ Z5 X: _7 q - will not explain how this can be done - there are documents out there for the
3 G3 ~! m5 ]0 ]2 y - interested. The requirements include a (empty) database for TeamSpeak to use
6 Q! n2 h, H3 x - and a user account (username + password) that has the permissions to do stuff
; H& X9 j( `) R+ K& R - with the database. Additionally, you will need a vendor library installed on the0 {8 o9 Z/ F8 c& J+ s7 y
- local machine, this came with my MySQL install.
7 o6 d* Z" V$ X' R - These instructions will not tell you how you might transfer your data from the4 n% }: x/ m% Q8 l w4 l* @4 ?; ?
- SQLite database to the MySQL database, we start with a clean and empty MySQL/ p* i& ]# Z1 S. n, z& p
- database.
$ K! h( ^ _# b. v4 P - Some users have reported ways to import a SQLite database into MySQL, but at, {7 P/ X' G" ~0 G; r( d8 t
- the time of writing, there are still too many issues - check the current status/ C2 }' y0 Y- u* U% }' z; S! i
- in the TeamSpeak forums if you are interested.0 @" t) |7 g* ?$ z4 @: ], N
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
# Z7 o2 N9 T( n7 h. A - Borland was used. This driver can only interface with the client library that
- h3 q' O: [6 L' I" g! q1 b - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% G ~7 h3 _2 R0 N, @1 r( q: ^: {
- client library - basically all you have to do is to use a 3.x client library as
5 t% P: E' `' S - "VendorLib" and a 4.x database to connect to.% P3 P5 k& V0 a- e @9 I+ Y
- If you need more info about dbExpress, you can contact Borland.7 ?, Y9 s: T7 D8 |
- 7 E& B; i' a) k# ^8 @% m
- ### Doing the work ###
% d9 N3 \9 w4 s$ I$ m8 e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ {) G- h7 E3 P+ [# D& j- ? - the perquisites right, just open your server.ini file, and add this section at
9 y4 q4 N4 c" e* s2 R# b - the end:
7 Z0 J1 {3 I& ~: w, L7 C4 F - ---cut here---! h: m# {, |/ K- s4 P
- [DBEXPRESS]
( W. [3 W0 s' M3 @+ u0 q9 v- S - sqldir=mysql_sql
; n: u# s8 y/ D8 z7 N. ?7 s - Drivername=mysql
8 K- D% N0 b7 n' `0 Y6 B - Database=Your_Database_Name_Here! G4 V5 p, ?; `& v% m1 { n
- Hostname=The_PC_the_MySQL-Server_is_on9 U2 C8 h, [9 f: |
- User_name=User_name_on_the_MySQL-Server* H! S. E/ ^% q. ^/ C1 a& e2 H
- Password=Password_to_go_with_above_user_name
- O# S5 ~( E8 R) L5 K3 p, s - GetDriverFunc=getSQLDriverMYSQL0 U; V( v- o' P( l6 V. S7 X
- VendorLib=path_pointing_at_your_mysql_vendor_lib
+ B& Q8 g( ]( l) m' ?4 l - LibraryName=path_to_libsqlmy_libary
! @2 w. A' S9 D - Active=1( D+ M2 Q+ D) H" S% `& {( c
- ---cut here---9 B2 ~' k9 l, ~& ~
- In my environment (a linux box with a MySQL server running locally) I have:2 K- P. w+ H1 {7 B; h* r9 V
- ---example---
' n; `! ]! H" A- Z) a+ p0 S- m - [DBEXPRESS]- ^: h3 x( U* o7 i# d; ~1 q) Q
- sqldir=mysql_sql
9 d' |4 h f+ `# h - Drivername=mysql. i$ u" U7 X6 \7 ^2 f
- Database=test
) l- G+ a( ~) d" k% ]- B - Hostname=localhost
7 c1 N: S- l( [6 S: g: \ - User_name=testuser6 g" o4 g. @7 D% x
- Password=my_password/ M; m' b7 P2 g: V8 e0 i% q
- GetDriverFunc=getSQLDriverMYSQL* C% v/ Z+ a1 V! w6 p' _, e
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ c9 M" ?! Y6 J% P
- LibraryName=./libsqlmy.so
& j! m7 o4 H/ X% I - Active=1
c! g' x: y5 q0 C. X - ---example---
0 o8 f9 `: k r" R/ U# k2 P
, G- X% h2 N% J$ W( f- On a windows box, also running the MySQL server locally, it would be:
$ i% [1 x; J5 ?* R4 u- { - ---example---1 C1 n) b4 S3 ~) Z: e
- [DBEXPRESS], ^, i6 t2 A2 ^
- sqldir=mysql_sql
' l$ t5 V% k( o& Y6 q6 `1 e% C - Drivername=mysql
5 c }5 C2 \' C( [ - Database=test
. h" j: j$ C2 K3 o8 l - Hostname=127.0.0.1
8 b- Q7 } ?( b$ O( M/ c - User_name=testuser
( M% x' p% E9 R6 y% S* g# D. K+ i7 w - Password=my_password: e3 V' N; k" c, }9 `
- GetDriverFunc=getSQLDriverMYSQL" O1 f" P; k8 e- l; E* q+ g T
- VendorLib=libmysql.dll
8 w1 h% B5 K& D v - LibraryName=dbexpmysql.dll3 X+ ?9 S! w8 @
- Active=1
2 E0 I7 @1 p5 }( h& @. q' J( E% o - ---example----3 g* `/ L c' b( {; v
- - written 02.03.04 by pwk.linuxfan# Z s+ f. c; O. \5 z9 s- i
- 4 R0 G, O: `8 y
复制代码 |
|