|
|
麻烦翻译一下,下面这段文章:xhan - }5 ]5 O) R k/ {
/ N' N4 y$ P$ s6 L-
9 }9 J' J# F% g% b1 Z0 z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 F4 \$ z. g7 R
. ? v8 {6 M' i, S- ### What we need ###
9 |' ^# j4 Y" Q0 R - Naturally, we will need a MySQL server to store the data for us, this document
, d* o) w L- V4 @) p- ]6 _5 r - will not explain how this can be done - there are documents out there for the
4 V: g+ ?, ~' K, n - interested. The requirements include a (empty) database for TeamSpeak to use/ h, L4 x: k7 Z4 E* I9 H7 ?
- and a user account (username + password) that has the permissions to do stuff
% J% v* x# l3 y - with the database. Additionally, you will need a vendor library installed on the
1 c$ g+ @; j [$ H - local machine, this came with my MySQL install.
1 Q/ c: w; B# c F2 K x; N - These instructions will not tell you how you might transfer your data from the
4 x# m7 |- T1 L6 F - SQLite database to the MySQL database, we start with a clean and empty MySQL
: u/ ^: _" p& f' I- D$ i7 N - database.; a: \* w( K: [2 U& O7 v! q
- Some users have reported ways to import a SQLite database into MySQL, but at2 l: ~; Q5 G0 M
- the time of writing, there are still too many issues - check the current status# }6 q5 V& P% [- z: @+ B0 [
- in the TeamSpeak forums if you are interested.
* u$ j- Q8 E/ q2 l' C - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: O# ]) Y, f# m Z1 O2 G - Borland was used. This driver can only interface with the client library that 1 ]1 n4 Z8 x U" ^0 ~. ~' D9 b
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% B/ j$ D: z' h9 _
- client library - basically all you have to do is to use a 3.x client library as 5 C9 m+ W2 C: n: t k* I Q" t0 W2 Z& X
- "VendorLib" and a 4.x database to connect to.0 k- _2 R! m9 a w- U Z' s0 v5 z1 H
- If you need more info about dbExpress, you can contact Borland.
! @( L1 |5 R" T1 a1 |* q
1 p0 g8 K O. K0 {- v: h. p! r- ### Doing the work ###
$ ] Q/ F- L2 a# |8 D2 [ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, R( n" ]' H7 s3 N( z - the perquisites right, just open your server.ini file, and add this section at
O+ q# K" Z/ d, Y) Z - the end:
- c/ T" {% T8 F& h+ Q. L- s - ---cut here--- m7 x/ j8 R3 z# ?; T3 `3 W- E& H
- [DBEXPRESS] R g) `+ M( |, |% e( g
- sqldir=mysql_sql
" W9 X: p; ]# T2 a9 {+ B - Drivername=mysql/ x+ m, q' t$ |) G* y4 m: t% g5 L
- Database=Your_Database_Name_Here
r4 ]- K2 M6 b0 F" a1 I - Hostname=The_PC_the_MySQL-Server_is_on6 \/ Z2 m" {+ B+ k& [/ u
- User_name=User_name_on_the_MySQL-Server/ S" H8 {* E: U/ U- E
- Password=Password_to_go_with_above_user_name( ]3 C2 t. S+ d& P% k
- GetDriverFunc=getSQLDriverMYSQL" l2 C& Q5 P( P# r `3 d( h$ z
- VendorLib=path_pointing_at_your_mysql_vendor_lib$ `0 @& \, j3 h/ A' f7 y4 W
- LibraryName=path_to_libsqlmy_libary5 [; i" G2 p% S# b: @+ C7 e/ s
- Active=1; I- M' S/ f* G& t( Y8 g% ]
- ---cut here---
) R2 u9 d% U7 C) X% l/ X6 U - In my environment (a linux box with a MySQL server running locally) I have:1 }% P; a+ o9 r4 m: x+ i8 ^
- ---example---
6 k) s; U- ^% p M4 f% f2 a8 C - [DBEXPRESS]
- X1 U8 K1 r. T1 y8 e - sqldir=mysql_sql: \- P, M( Y: q @; x% n; h# m
- Drivername=mysql
7 @) b1 v5 Y1 T6 I& h7 L - Database=test
, Y) X3 ]+ ^3 d - Hostname=localhost
7 I/ P: J! w3 ^+ j' S% V - User_name=testuser
: W7 f) `3 L' z9 A% [ - Password=my_password' s1 b2 V( A8 M- c6 _" p& Y
- GetDriverFunc=getSQLDriverMYSQL
$ |/ O$ L) f5 x5 O. V2 @2 y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& U' P3 w- ]! k' [1 H6 I
- LibraryName=./libsqlmy.so
/ ?' e2 _/ c0 n* o% O6 ~7 {, I - Active=12 Y. A9 N, V+ Y. t, C2 g5 k
- ---example---: c0 H9 t2 d( w! V
d* B3 F9 w* T8 @5 G, ` t- On a windows box, also running the MySQL server locally, it would be:
5 ^* O. Y5 i0 O! P; C - ---example---- _8 P t' K" V; F1 x# @
- [DBEXPRESS]5 W( c* _7 i* w' S
- sqldir=mysql_sql
! j* M, L" P/ H, s - Drivername=mysql
- v7 z4 Q# M; s& g4 L" S4 m9 J0 {1 U - Database=test' g* f! j+ z0 \7 N! k# r
- Hostname=127.0.0.1
3 f- _$ J! Z9 P& q* C - User_name=testuser) ^: X; [# e/ {! y, m. A- X
- Password=my_password# {- G" b: f# l8 D1 ^* F4 C
- GetDriverFunc=getSQLDriverMYSQL
9 i5 I k: m7 t; J - VendorLib=libmysql.dll# e1 i0 m3 _# }3 N
- LibraryName=dbexpmysql.dll# r5 R) t3 ]2 N0 N
- Active=1
$ p& ?, \2 v& t' C( E3 ^ - ---example----
; K% o) Z4 i1 o# C l - - written 02.03.04 by pwk.linuxfan- Q5 R6 W; e5 K0 _) E F- j; L7 q
- . a) n a) i3 ^ T1 P, P# J
复制代码 |
|