|
|
麻烦翻译一下,下面这段文章:xhan
- S+ r0 o9 K) R* A* }" g; w; o
; r( B3 J5 T( _2 ^$ u C-
6 ]. ]$ @4 \. q" I: j - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 F# f% u) Y0 h
, H) e. U+ w' Q7 D7 p- ### What we need ###5 W4 m3 f/ @1 D4 c% o6 o
- Naturally, we will need a MySQL server to store the data for us, this document . q0 q0 }# B+ ^( M8 h5 l* |+ f
- will not explain how this can be done - there are documents out there for the
! m; g7 p& I; N. }4 W0 O% |1 } - interested. The requirements include a (empty) database for TeamSpeak to use
3 L! X0 r% S6 z" W2 {1 Y' C - and a user account (username + password) that has the permissions to do stuff
/ C5 L3 b9 S/ ]$ { - with the database. Additionally, you will need a vendor library installed on the
8 J6 E1 y7 W& K7 q1 P* ~! h) X - local machine, this came with my MySQL install.% L& T9 b+ t* w5 {1 O
- These instructions will not tell you how you might transfer your data from the$ ]8 B! F6 c. j1 P6 E& X' f
- SQLite database to the MySQL database, we start with a clean and empty MySQL
8 z! u- N; m7 t- }8 r4 ^ - database." A2 [; R; R7 D1 Q
- Some users have reported ways to import a SQLite database into MySQL, but at
! o$ }, q& {" }- E3 q# I4 O" ?8 {" @ - the time of writing, there are still too many issues - check the current status
6 R$ M' Z# E7 E' n! C - in the TeamSpeak forums if you are interested.
- e3 G7 ^, A* i2 [. T# d - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* V. O% S' T9 S2 i) {
- Borland was used. This driver can only interface with the client library that
1 n6 ?: I6 `4 P7 L& P% u% f( v2 K - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" g0 p: d* X% S- m
- client library - basically all you have to do is to use a 3.x client library as
' M$ W: s% w% u0 U- J* N# s1 I/ D2 y - "VendorLib" and a 4.x database to connect to.( T) i% I# t1 Q; h [. W
- If you need more info about dbExpress, you can contact Borland.
" c% O1 Z7 I. O+ I' E, q
* [- I& l7 ]6 p6 g" c# A- ### Doing the work ###
4 B# ? {: c4 d' h - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all% @! H- b. o6 Z0 Q
- the perquisites right, just open your server.ini file, and add this section at
' ^+ J0 @/ N9 \+ K% l+ s - the end:( L9 j m, u: Y8 h! D- m
- ---cut here---" v/ \- Q" M3 ]" v4 n9 g0 q
- [DBEXPRESS]
! @/ ]/ j0 p$ j! d1 Z# Y - sqldir=mysql_sql t" K$ u1 e3 f# V' W
- Drivername=mysql
% d# @# ~6 ^6 E - Database=Your_Database_Name_Here
$ Z! J/ f" I4 Z0 m: w# c: z - Hostname=The_PC_the_MySQL-Server_is_on
. G7 m$ n# E9 c+ ?# |' B4 w - User_name=User_name_on_the_MySQL-Server
+ l1 w5 ]4 Z4 Z5 v8 @9 I2 D - Password=Password_to_go_with_above_user_name) J' G7 A* t; g1 J
- GetDriverFunc=getSQLDriverMYSQL
: w) e4 e- D/ `! ~ @ - VendorLib=path_pointing_at_your_mysql_vendor_lib
& `+ ], J3 U. r0 ]1 h - LibraryName=path_to_libsqlmy_libary+ h8 I& w, r; p; F$ ]
- Active=1, V4 `" @6 e7 Q; g
- ---cut here---6 z3 W% G7 F% c( g% f! U
- In my environment (a linux box with a MySQL server running locally) I have:& h) p, n2 E/ ?) A9 d5 _7 w* g7 E/ V# a
- ---example---& c% E; ]) u. h6 ?2 H( I; T+ {
- [DBEXPRESS]
0 Z! Y: s: U$ P5 l+ {$ ]( W - sqldir=mysql_sql
. D' r1 v5 |' h! k% Y - Drivername=mysql
: Y1 |2 ^4 d: V3 s+ Q5 T - Database=test4 ?4 O- @- @7 P C. K
- Hostname=localhost8 P$ l! F' v$ I# h+ Y
- User_name=testuser
$ x3 u. h0 x0 `- N - Password=my_password
+ J+ t" { {; p - GetDriverFunc=getSQLDriverMYSQL
% Z T7 T) v9 D9 M0 o- W5 h0 l" S - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 q0 P$ i7 F5 T% x! l# T9 K4 j
- LibraryName=./libsqlmy.so
5 n! I' d9 o7 @8 F, x% M& {5 V - Active=1
( H4 v' w1 }5 @& i; d% V8 s! u - ---example---
- Q( t/ F1 y' i6 T7 N: x
5 c/ A' E3 W& I! `% n- On a windows box, also running the MySQL server locally, it would be:# `& A: }% M# o9 [
- ---example---
8 e1 M# @* D7 o4 p - [DBEXPRESS]. G! d0 O6 @: y+ N+ y9 E5 v
- sqldir=mysql_sql& U1 z. Y' x: D" E5 Z9 l& L8 J& |
- Drivername=mysql
4 ?" I, J4 W x( d$ ]. Z8 g5 C - Database=test
4 m1 O2 c1 w3 a3 M+ Y - Hostname=127.0.0.12 f( \9 H* L+ W- J8 j* Y
- User_name=testuser
; E# w0 l0 W* N9 { - Password=my_password% @) W& @, l! s' w f) e
- GetDriverFunc=getSQLDriverMYSQL
2 C% ?. v4 j ~3 r- J7 W1 o8 Y& c - VendorLib=libmysql.dll8 \1 C* r1 t" T% ?6 }
- LibraryName=dbexpmysql.dll0 w1 j, U+ z0 P3 L
- Active=1
# ~) T, W6 f' ~$ H0 G& u2 I - ---example----
i& w7 M" A$ G; T - - written 02.03.04 by pwk.linuxfan. v6 k8 t7 k* S$ M
- 1 N+ I) v! Q* x. S
复制代码 |
|