|
|
麻烦翻译一下,下面这段文章:xhan * B0 |# l' ?( O5 ~( _! }* L; I# S$ X
: y* ]$ C e% l5 G3 h5 c
-
- z9 j* R: p6 ]6 P5 n/ ?, b - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######+ a! |1 @& A: u! P A. g
- ) V3 u g6 T& w+ f4 {+ v
- ### What we need ###
8 y) ~% E/ l& c5 Y6 n$ O - Naturally, we will need a MySQL server to store the data for us, this document
) ?2 i4 s0 P( B - will not explain how this can be done - there are documents out there for the ' n8 N* F h8 |# J/ O E
- interested. The requirements include a (empty) database for TeamSpeak to use4 ^' x, E6 E! ]9 C" ^, T# x
- and a user account (username + password) that has the permissions to do stuff
" b8 g/ e, P8 T b/ w+ l6 c, ?0 _ - with the database. Additionally, you will need a vendor library installed on the& n* t, ]7 W* M; @3 h
- local machine, this came with my MySQL install.6 p* u# `1 r7 ]& z2 q. Y
- These instructions will not tell you how you might transfer your data from the+ B; t$ q$ d0 O3 S6 [. L) K
- SQLite database to the MySQL database, we start with a clean and empty MySQL+ E7 ? U! W$ t- y% p/ J% u
- database.5 W E/ N5 R* y* p/ e- s
- Some users have reported ways to import a SQLite database into MySQL, but at
4 a# p% ~/ x/ j' g3 X - the time of writing, there are still too many issues - check the current status
6 C" v1 C- s& Y) W% }! o - in the TeamSpeak forums if you are interested.' }, p r* n8 I3 L' S- J
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 Y! N3 K9 \$ y( `6 L! v0 f - Borland was used. This driver can only interface with the client library that # s! F: W: g0 ^# x
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 H7 Q' p% @7 D9 ]" w5 w
- client library - basically all you have to do is to use a 3.x client library as
; F q* K$ L7 |4 v - "VendorLib" and a 4.x database to connect to.
q0 P8 m8 p( a- r; X- t - If you need more info about dbExpress, you can contact Borland./ k) R0 G" Z4 j
( e9 B' x, i. O) e. `. e- ### Doing the work ###
# h# B' _9 Q/ [( t6 B' a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: T0 Y' A- q9 R! {- Q/ ~1 n
- the perquisites right, just open your server.ini file, and add this section at
; b) k+ ^- P" D, w6 @ - the end:
5 U0 ]) Q' o( N v8 ~6 t9 R L - ---cut here---
) s7 d5 E7 a- k - [DBEXPRESS]
z8 O" M7 r3 j% y - sqldir=mysql_sql5 o) Z S% E$ l. W' u0 h
- Drivername=mysql
$ u- x! R0 t+ k8 o0 y* R# U* F% e - Database=Your_Database_Name_Here
: D* C$ E0 r6 |9 M3 Q, K$ M+ H - Hostname=The_PC_the_MySQL-Server_is_on
7 @" @ T8 ]; V% s - User_name=User_name_on_the_MySQL-Server+ v/ p! {7 c7 }9 X6 J0 s$ R! T
- Password=Password_to_go_with_above_user_name% n7 F6 g5 s4 R7 R! W- ~
- GetDriverFunc=getSQLDriverMYSQL
9 c" ]6 V9 Y3 R; Z - VendorLib=path_pointing_at_your_mysql_vendor_lib2 ]* c* e9 {+ ~ x! Z/ m" G. }
- LibraryName=path_to_libsqlmy_libary
2 F/ u& @4 F! z3 j. |8 J6 ^# n - Active=1" T( O) W; a5 ]" w; h
- ---cut here---
) P7 A# Y# f# s! J/ j& q - In my environment (a linux box with a MySQL server running locally) I have:
2 v" O5 s0 A: V, }1 z - ---example---
: O4 O& \% a0 Y" S1 J/ s7 ~ - [DBEXPRESS]$ X0 z& L. u9 ^' A
- sqldir=mysql_sql
! Z. N% ~$ b( x1 W3 w5 p w - Drivername=mysql* Q: ]0 M! C: N" t4 o
- Database=test
# {: m7 Y5 n- ^0 m - Hostname=localhost9 q) E" k; ]. ]
- User_name=testuser2 Y6 H% s* ?* [$ [ Y
- Password=my_password
4 N. t7 L) {, v/ y" S - GetDriverFunc=getSQLDriverMYSQL
* S! u% R, o; l6 B' d8 k: q - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 P5 L7 Y" x, M1 ^3 _2 x2 z0 @ - LibraryName=./libsqlmy.so$ c' J4 @4 [; d4 n" V8 w
- Active=1
6 p# W- D$ {* G+ E7 t - ---example---& W; [& f- G4 G! O( n2 C
- 9 [+ S/ G2 ?9 T6 ]4 J
- On a windows box, also running the MySQL server locally, it would be:
3 X$ L# L$ N/ B8 ^8 c8 n - ---example---
% l3 J& H3 u9 `* F2 x8 E! X - [DBEXPRESS]1 R) @# M- S, G3 h
- sqldir=mysql_sql5 F6 j0 D! k& p% y! f. d* `
- Drivername=mysql% P5 r( _6 u. F: a& S
- Database=test
- n" ^, G! \5 f0 V$ w" N5 | - Hostname=127.0.0.14 d4 G+ V R1 O- N" \. v
- User_name=testuser
; U$ A1 l7 N' b: ]" T s - Password=my_password7 f Z2 ?/ U$ I2 E7 t
- GetDriverFunc=getSQLDriverMYSQL
; G) K5 _4 _$ `3 n" k - VendorLib=libmysql.dll
. P$ ~2 s& n# n - LibraryName=dbexpmysql.dll
' _0 x" W9 R( x8 |9 B/ d - Active=17 l- H" Y3 J( Z, `! f
- ---example----& I( k3 k% r0 v I
- - written 02.03.04 by pwk.linuxfan
' I0 u7 w5 J, x6 b8 F( B6 k! [
, a0 Q8 W n2 u0 ]4 }. `8 Q
复制代码 |
|