|
|
麻烦翻译一下,下面这段文章:xhan ) x# e7 R/ A- W6 D
9 F1 m2 ?+ ?! ?3 x
-
/ b9 R$ t5 K) x( R/ K+ S1 r( B4 B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* _' V5 F2 G. M1 q2 J1 o7 h - 1 Z# _: [: Z+ t( o7 R ?
- ### What we need ###7 }! A. ]& q: \( q: U- n% X
- Naturally, we will need a MySQL server to store the data for us, this document
) g# q! O% _6 e: H# i7 M' H. u! a - will not explain how this can be done - there are documents out there for the
3 D, u9 n, l1 `+ g - interested. The requirements include a (empty) database for TeamSpeak to use
) W* T3 F9 c; p; E: T - and a user account (username + password) that has the permissions to do stuff
, i5 C8 t8 d. Q! s+ ^" q - with the database. Additionally, you will need a vendor library installed on the. m" i( x7 d$ V! V5 j6 [7 W8 c" u$ s
- local machine, this came with my MySQL install.3 X0 l# C3 h* \8 o9 f( I
- These instructions will not tell you how you might transfer your data from the9 g, o5 R7 s/ ~# u! `
- SQLite database to the MySQL database, we start with a clean and empty MySQL9 A+ A* [ Q- x( p
- database.2 {, w+ T* Y- Q$ g
- Some users have reported ways to import a SQLite database into MySQL, but at- E; S9 N& X1 x! k
- the time of writing, there are still too many issues - check the current status
/ a4 d! `4 O/ `( D% ^1 u& k6 B - in the TeamSpeak forums if you are interested.) H9 B# {5 I: x" h" @! J' S. S
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 B4 `9 b% ]" Q! g4 B; A- b9 i8 f
- Borland was used. This driver can only interface with the client library that
% P: A+ T/ X4 u, o O - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
2 ] u" ^: N6 I& _3 ` - client library - basically all you have to do is to use a 3.x client library as
0 Z: {* _9 e' y1 b' H - "VendorLib" and a 4.x database to connect to.
* o4 u- x _8 M6 U0 V - If you need more info about dbExpress, you can contact Borland.
" T6 z4 r' C' c- Z& o+ J" W' W# U - / z T3 B8 V7 C* K* {
- ### Doing the work ###
2 b( }9 T5 a# k - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
) h- ?0 A1 F+ p: |' q - the perquisites right, just open your server.ini file, and add this section at# U% Y7 V. S( O) _& T) J& c
- the end:
" n0 A6 R0 F- c - ---cut here---
2 T7 v% @. a/ | - [DBEXPRESS]
) }# X* a ]- y; P, }5 Y - sqldir=mysql_sql
' S9 U, E6 S/ b8 u! A ? - Drivername=mysql6 l' B( o7 F- I9 A: M# B
- Database=Your_Database_Name_Here
% U6 I# H- @6 Y; P7 M I2 T8 z9 _. ? - Hostname=The_PC_the_MySQL-Server_is_on
* k3 V0 }& f- a- E* o' P - User_name=User_name_on_the_MySQL-Server/ q# F' M' f' q0 x" _
- Password=Password_to_go_with_above_user_name
1 G: h4 g# }* G' \' }2 f - GetDriverFunc=getSQLDriverMYSQL
& G( b$ ^9 V! ~# i+ } - VendorLib=path_pointing_at_your_mysql_vendor_lib
# X$ Y3 o) Z6 v# N" e; k - LibraryName=path_to_libsqlmy_libary
6 c. P5 S$ k: t8 ? - Active=1$ e7 a; y+ a9 ]0 ^/ f8 F, [% W0 l8 J2 {
- ---cut here---
' ^% {9 M; i9 |3 o0 o - In my environment (a linux box with a MySQL server running locally) I have:
* t$ z# M* |# F( Z4 O9 ^& C- m5 R - ---example---& n9 J$ l% S1 L; r
- [DBEXPRESS]/ k" _: s% t# z7 T
- sqldir=mysql_sql0 A L' t7 G+ i. ~$ b# j/ o
- Drivername=mysql
% f( f7 E3 J% C2 h3 Q' v' c - Database=test
0 ~0 Z% V V6 C3 Z# ? Q* M - Hostname=localhost
4 C8 z x. b* e, }2 q - User_name=testuser
, w+ }# t9 ~' J' S% `5 _ - Password=my_password
- U6 b! I4 j# c4 |6 [2 H/ ]7 v) b8 ^ - GetDriverFunc=getSQLDriverMYSQL
" R$ R5 W* T/ Z5 w8 u7 X8 h - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( B% M. @; Q" X3 Z) v6 _# a - LibraryName=./libsqlmy.so
% s6 v8 w# N$ n. A# R - Active=1
* f& K, O# @5 M/ @ - ---example---
9 s! u2 B: l( v( e* r7 h
3 ^1 l1 i* K/ p+ u0 k/ w z: \- On a windows box, also running the MySQL server locally, it would be:
6 m: N- Q; @2 N# p* K5 C0 F - ---example---
4 ?# G# K. n6 q& L - [DBEXPRESS]
2 i1 s' q; I9 d: Y0 u$ r - sqldir=mysql_sql/ W/ N; L+ s# n% M5 Z! D( v
- Drivername=mysql# Z" @5 ?; Y9 k! r' D
- Database=test
9 F& N$ @+ _( b# _6 @% J* C5 t6 ? - Hostname=127.0.0.1& V; k$ S3 ~1 o) i
- User_name=testuser
2 F) A- u4 ?: o - Password=my_password
/ b' `2 q9 Y; Z' v6 C7 I - GetDriverFunc=getSQLDriverMYSQL) ]* q; [/ M' Q
- VendorLib=libmysql.dll
/ \3 e8 H0 s( o - LibraryName=dbexpmysql.dll
7 Q! I/ l3 f% P/ D6 W: Y - Active=1
8 e1 S& D& M$ {; C& C, M" k( b - ---example----
: P1 G) G3 A' ^' ~ - - written 02.03.04 by pwk.linuxfan4 g5 a& L. ]" z2 I5 z: S% m
: {0 q* ]: h; F. P0 I
复制代码 |
|