|
|
麻烦翻译一下,下面这段文章:xhan + {9 p/ G# U& Q. N% F! C
+ @; F/ E3 v5 Y7 O% b/ K/ d
- : k+ m/ p! T% i( g8 \4 f: U
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 K' e6 y4 D1 Z( w9 T
+ _$ d. K4 t% U6 N- ### What we need ###
2 d! V/ t1 Y# W, H+ @7 M3 x - Naturally, we will need a MySQL server to store the data for us, this document
* ~* p/ k+ M8 A- j - will not explain how this can be done - there are documents out there for the
, g; I2 p2 i! P( k - interested. The requirements include a (empty) database for TeamSpeak to use
3 k- \) }) d" v" b - and a user account (username + password) that has the permissions to do stuff* R" \, S. C, y+ z
- with the database. Additionally, you will need a vendor library installed on the
* E& E, {2 X& M# v. h2 [0 a - local machine, this came with my MySQL install.
7 o' z/ J5 P; e - These instructions will not tell you how you might transfer your data from the
7 G \5 I9 ~5 F9 Y2 { - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 z: ~6 K7 ]6 w* u: l$ o6 |; E4 [ - database.
, ?% I1 J6 p4 T j/ Z/ o - Some users have reported ways to import a SQLite database into MySQL, but at! O, j# |+ |' L J
- the time of writing, there are still too many issues - check the current status1 ^' a) T' d. i) Q1 o- V
- in the TeamSpeak forums if you are interested.
" Q5 k' Y- M0 z# v0 c6 S - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
2 N' ~, k2 Z1 W9 H' Q - Borland was used. This driver can only interface with the client library that
, `' k! \2 S/ V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# {6 E& }+ P5 N- x6 S+ i+ N" i8 p
- client library - basically all you have to do is to use a 3.x client library as
' d$ H5 l7 H' e" X+ P# |$ c3 r - "VendorLib" and a 4.x database to connect to.
7 d4 l7 G, K! U2 {1 k# y- F/ d - If you need more info about dbExpress, you can contact Borland.3 W! l- @% k$ I" N
- ' j/ i4 x- K! k* [+ j9 I" S4 C
- ### Doing the work ###9 v2 r6 K- x5 b [# `1 E
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all. u9 Q# L; @% y5 a; E! R6 u z
- the perquisites right, just open your server.ini file, and add this section at( A# ~; U5 `0 A. f! Y) b1 X
- the end:' ]. d6 w! s! j
- ---cut here--- t( F% ]+ [, K( D& x
- [DBEXPRESS]
/ v- h/ W+ D! H" j2 w' y& g, v8 Y. O - sqldir=mysql_sql7 t# l; I, q$ C
- Drivername=mysql1 [2 e+ m' x+ J' }: c: x! t
- Database=Your_Database_Name_Here
% w* }3 X. |! z3 O5 w( K: _5 M - Hostname=The_PC_the_MySQL-Server_is_on$ C4 g7 ~) T1 C+ c- B
- User_name=User_name_on_the_MySQL-Server
: o7 s% O1 V1 N& a# d - Password=Password_to_go_with_above_user_name1 B' }. r4 B/ t! a3 K( O
- GetDriverFunc=getSQLDriverMYSQL& j. q9 G+ U# n4 B$ O' I
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ a/ d5 j# S9 Y6 a' e% H' q* [' N - LibraryName=path_to_libsqlmy_libary+ f) g9 O% c% y$ I+ V9 u
- Active=1
* }8 q$ F- u( k3 Z3 G! m4 o7 ~ - ---cut here---
4 t; w9 I, Z$ y$ B; f2 x' l- R - In my environment (a linux box with a MySQL server running locally) I have:
2 P M! Q5 h' g) o B7 ]6 k - ---example---+ p2 F; ~8 n( j0 G
- [DBEXPRESS]1 n) y$ q/ t. i+ O8 @
- sqldir=mysql_sql& l$ h/ ^+ ~3 s
- Drivername=mysql
9 w4 l* e+ ~8 L - Database=test
- i3 A2 G0 C% N+ _/ a1 N4 Y - Hostname=localhost
S; Q5 j: ^2 x - User_name=testuser+ s8 i5 H1 E2 c+ O$ f
- Password=my_password" X" `! B8 \, \& T; x! Z
- GetDriverFunc=getSQLDriverMYSQL
8 B4 M" o+ m, l - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
N4 @. `+ a; o) L, N# D - LibraryName=./libsqlmy.so
5 @, U8 l" @% s3 M; v - Active=1+ m* ^; z8 K8 l! o F: K% m
- ---example---6 Q' A2 Y( m# C& w# r! g$ [
% C' I1 I! U6 w1 G; w6 }, }- On a windows box, also running the MySQL server locally, it would be: \1 [/ }4 |: g, D ^+ t# y
- ---example---
8 O& J& u! }$ m - [DBEXPRESS]6 l: }8 F- K4 o$ h5 ?
- sqldir=mysql_sql
. G U! j Z5 S6 I - Drivername=mysql
% [1 ~" u$ J) ~ - Database=test
! W& e1 L+ p+ J' Y7 e. W - Hostname=127.0.0.1: ~3 `9 g7 f" n9 U! i/ g" g( _) v
- User_name=testuser. F3 g. x+ p9 M& K% x' r4 r8 k
- Password=my_password
, h! }/ }& c' ?$ D0 @+ I - GetDriverFunc=getSQLDriverMYSQL# F! A( t) s) E6 V" X' E
- VendorLib=libmysql.dll" y$ u3 k8 r4 |, q1 W
- LibraryName=dbexpmysql.dll' O% u$ y! O: E( M
- Active=1
" m# ?& S' |1 M( |. O+ I5 D - ---example----
3 E( T2 Q8 g H3 w# | - - written 02.03.04 by pwk.linuxfan0 P" q, x5 C! W+ O x
- - g1 z1 l; d! {; J# E
复制代码 |
|