|
|
麻烦翻译一下,下面这段文章:xhan
: \1 C4 ]% \) Q, T- M; R3 V% N8 v4 V: }* a
-
, x; h$ o/ ^# m; K4 x6 K V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) A; u. x' H. ]' y& n' ]& [4 [ R: A
- q: e6 R% X0 T+ _2 n) i
- ### What we need ###
& ~& d/ Z4 U6 B, M7 V5 z, z0 ] - Naturally, we will need a MySQL server to store the data for us, this document
8 I6 W9 h, H7 j( U - will not explain how this can be done - there are documents out there for the : ^3 Q7 t) A w* k: i i5 z, e
- interested. The requirements include a (empty) database for TeamSpeak to use7 x j4 U5 ^$ E: \
- and a user account (username + password) that has the permissions to do stuff
9 M' t I; _' ~2 z }6 ~ - with the database. Additionally, you will need a vendor library installed on the
6 E# o/ F: q) ~5 o. n: R - local machine, this came with my MySQL install.5 M2 i: q! F/ w% B& ?, q
- These instructions will not tell you how you might transfer your data from the8 [4 N; x$ H+ T( G9 `# R A* B
- SQLite database to the MySQL database, we start with a clean and empty MySQL$ s' w! d7 o( M- t( h
- database.
5 M2 B( a& s3 }( t0 A/ f3 P - Some users have reported ways to import a SQLite database into MySQL, but at! S+ G% z( C' Z$ V: Q! ^- ]
- the time of writing, there are still too many issues - check the current status
. F% J% j7 H: d' Z( m0 x7 k$ B - in the TeamSpeak forums if you are interested.7 ~2 h. Z0 J0 g. r) ^: v0 i
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. H. O1 x7 O- H9 q
- Borland was used. This driver can only interface with the client library that ; P* C4 z {/ n- a
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 ^$ l& m& z2 ]/ N/ D: K c9 P
- client library - basically all you have to do is to use a 3.x client library as # B0 Z% S8 ^* {3 e$ |# e; ?
- "VendorLib" and a 4.x database to connect to.4 z, s0 x0 `7 k# _: v
- If you need more info about dbExpress, you can contact Borland.# b7 }: B _. Y+ U- X4 p
- ! I( ^( X9 A: ^6 a- e
- ### Doing the work ###3 s. N+ O% ?! z" z3 }) R" g
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 U5 Q0 e- j. t) w, r) c
- the perquisites right, just open your server.ini file, and add this section at2 C8 A! g8 f# C
- the end:
8 W4 c* Y6 Q# H5 \4 f" S - ---cut here---4 M- M. c9 p5 W1 S1 ?
- [DBEXPRESS]' f5 O# q9 [" N/ P, ?; b" c: D
- sqldir=mysql_sql
^' m! a! w2 s6 G. V' R# k. x- T! e - Drivername=mysql. O1 ]+ }9 o @6 ?: g/ W$ y- D5 E6 ?
- Database=Your_Database_Name_Here
0 k$ F8 m/ Z) D; E% r0 l- t! }% g7 a - Hostname=The_PC_the_MySQL-Server_is_on J: L( D- i( Y2 w: I3 }% x% B
- User_name=User_name_on_the_MySQL-Server G# }; D3 d" Z- m; q8 t( Q
- Password=Password_to_go_with_above_user_name, L- w: V# B& E* E+ V
- GetDriverFunc=getSQLDriverMYSQL
; Y( U( E& x3 w( O% Y1 T+ r8 G/ j - VendorLib=path_pointing_at_your_mysql_vendor_lib
$ n% g& F @( V8 h6 G! N - LibraryName=path_to_libsqlmy_libary; v' @% P1 n7 r1 @) n6 ^
- Active=1
8 T# m5 M; T6 T5 T' x1 x1 y# w0 W - ---cut here---
: H' z8 c1 ~, g) u2 u) b - In my environment (a linux box with a MySQL server running locally) I have:
8 N9 J7 n' B3 K" D3 B4 \- c* R - ---example---
# p+ Y8 o2 @9 O3 B) x* q - [DBEXPRESS]
8 Z( c7 ?5 A, G - sqldir=mysql_sql4 K0 S m; ?; J
- Drivername=mysql
$ s1 F% Y, i! _ A - Database=test5 x* Q6 q Z# [5 Y6 y6 x
- Hostname=localhost+ X6 F" k2 T% y: d* P% }
- User_name=testuser
! h1 I1 e% _ B. V. h& Q( G - Password=my_password
$ R9 L5 h: y9 T% U( | - GetDriverFunc=getSQLDriverMYSQL, X, ]) L: S' f! C
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& h) n0 E( M0 e% T/ s8 `+ b
- LibraryName=./libsqlmy.so
4 Q S7 M+ P# L" L9 r - Active=1- `# Q- t8 }! E) E" p
- ---example---
0 h$ k O" G( O - - Y/ q* @6 s5 y* p& K7 ^3 y7 H
- On a windows box, also running the MySQL server locally, it would be:
5 I! d: @. X) U* ]1 s, k - ---example---
: T( L7 \+ y! Z5 @9 ?% U. ?6 x - [DBEXPRESS]
" F2 t! [! W& ?2 M# G - sqldir=mysql_sql
7 M5 \. }: X R/ B9 { - Drivername=mysql
' m. e F4 U0 ], ?- Y: p - Database=test
' x6 m0 e M1 \- Y- e% D& _8 r - Hostname=127.0.0.1
1 N2 t; Y# h0 r- n - User_name=testuser
) n2 X" k3 P4 {1 i8 Y - Password=my_password
# U- p' @6 Y' ]2 a3 B - GetDriverFunc=getSQLDriverMYSQL p6 A p! P% r; C; A8 y2 X" X' U2 f
- VendorLib=libmysql.dll/ _1 n5 r& k/ b9 X
- LibraryName=dbexpmysql.dll; }, E- s& ~) T+ R- C& G
- Active=1# v2 V* K1 M7 p7 g% O5 x6 v9 Q
- ---example----" x6 O, }) v& ?: F6 H2 _
- - written 02.03.04 by pwk.linuxfan
. D$ x* c& R w4 U& g4 a8 A* P - 8 h' L. M7 v0 C4 e* J" x
复制代码 |
|