|
|
麻烦翻译一下,下面这段文章:xhan + x4 B, C& K7 B4 m
) X; A, N2 w( F/ y+ O
-
( |1 @7 i1 ^, z8 z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: M' j9 }; _& O3 }0 Z
& X& e: W7 D# q5 B- ### What we need ###
! |+ T1 }* s( r- Q c% `+ Z - Naturally, we will need a MySQL server to store the data for us, this document & I! O6 c1 t P
- will not explain how this can be done - there are documents out there for the
; T" I. J2 \9 m; O0 y - interested. The requirements include a (empty) database for TeamSpeak to use
: q1 k: V: G- I" | - and a user account (username + password) that has the permissions to do stuff
! T: t) x8 {9 E( M j. u& Y - with the database. Additionally, you will need a vendor library installed on the
5 c4 r1 H+ L. ]+ E/ k! Z- U - local machine, this came with my MySQL install.
; J% y/ K/ ]% | - These instructions will not tell you how you might transfer your data from the6 ~* h8 T/ b9 f3 r7 p! u
- SQLite database to the MySQL database, we start with a clean and empty MySQL( n6 V$ F4 u9 @' n
- database.4 F) a, X+ D1 _- e1 U& H* ^- w
- Some users have reported ways to import a SQLite database into MySQL, but at
" v. [7 D) y, M# `& F$ \4 Z% T - the time of writing, there are still too many issues - check the current status* \- d7 v5 N& M8 R, ~) y: H
- in the TeamSpeak forums if you are interested.
( _" m2 G) E" m+ { H - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from! v4 @: n! j L$ T
- Borland was used. This driver can only interface with the client library that ; z- o. e! V6 u4 `0 t
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 L5 J) r. V9 W
- client library - basically all you have to do is to use a 3.x client library as
* I* |5 W; w7 q c+ a - "VendorLib" and a 4.x database to connect to.
& h+ q2 u. u N$ f' } |$ r - If you need more info about dbExpress, you can contact Borland.
: p7 ~/ H$ s8 W, s% O - , n' T; }4 Y L/ H/ n* t
- ### Doing the work ###
G& U7 o9 r H7 o0 j& Q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 [1 H2 b: }* E0 l- {
- the perquisites right, just open your server.ini file, and add this section at
8 \4 P0 T1 S9 ^6 I; e1 _ - the end:% T, S, \& R; Y' i
- ---cut here---
" C+ {* `8 A& k* t - [DBEXPRESS]; f% Z" [4 m1 |* E9 v8 B
- sqldir=mysql_sql
3 N/ g* j8 e* W" T3 O - Drivername=mysql$ b) q( k' ?* R9 m& e
- Database=Your_Database_Name_Here8 d+ K9 W- P- |, ]/ v
- Hostname=The_PC_the_MySQL-Server_is_on# N$ t( P4 ?4 h% h6 g. L$ `
- User_name=User_name_on_the_MySQL-Server
, d4 r( {0 N8 H6 Q5 V" x - Password=Password_to_go_with_above_user_name0 [$ F9 W+ k/ U2 L
- GetDriverFunc=getSQLDriverMYSQL/ k8 t: l! k3 B' |8 O0 ^) a
- VendorLib=path_pointing_at_your_mysql_vendor_lib
- s U" d: A7 [& X0 @3 P% w - LibraryName=path_to_libsqlmy_libary& _% N8 S; a; z& A- r
- Active=1
! Z( p7 \5 X" y% U0 P. h; { - ---cut here--- R4 `0 }2 d5 `9 m d4 [+ v
- In my environment (a linux box with a MySQL server running locally) I have:
9 r. v5 d4 ?$ Y: w& _, o' W+ } - ---example---+ y' }; H$ ~$ B, r) g
- [DBEXPRESS]" C' _" k% h* ]# \8 `
- sqldir=mysql_sql
0 n0 ]' {' _7 W: k& V7 ^ - Drivername=mysql
) u! n) q/ Y! w& w% j k) r - Database=test- f; R( h, u8 b7 d# l0 q
- Hostname=localhost2 ~+ N8 K0 |0 f" I" [, J" _
- User_name=testuser% p I# U6 o r, L' x# P
- Password=my_password
' [( H. `$ o; ?4 U1 e - GetDriverFunc=getSQLDriverMYSQL% j. j7 f0 A6 N* P2 ^$ B
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 i+ r4 ]3 K' O4 Y0 M% ]9 P6 K2 T - LibraryName=./libsqlmy.so c2 d, c3 t6 J. _1 W
- Active=1& f" V. i: o0 y# A* |% K0 U
- ---example---
2 h# `$ ]1 v% m& B q
1 f w; S3 f0 w6 b# @7 S% y$ J- On a windows box, also running the MySQL server locally, it would be:
" R! { ]7 a$ m7 n4 H5 j( |6 H - ---example---5 g# D8 i* t; [/ i0 I
- [DBEXPRESS]/ {8 Q: ]* a( a3 ~8 D3 @# f
- sqldir=mysql_sql: S% L3 |: _: M* k$ a
- Drivername=mysql% f r' R6 R/ ?) _ H1 B' y
- Database=test0 o- M+ ]* I4 P! B5 z. g0 Z! m
- Hostname=127.0.0.1
. z# T n+ h$ A `3 z1 c' t7 F - User_name=testuser6 |( `& ]3 A4 e8 y; t. O8 Y) T
- Password=my_password
4 w9 K/ J r. ^, u) i- u - GetDriverFunc=getSQLDriverMYSQL
9 Z0 h [& R8 _; i0 D: b - VendorLib=libmysql.dll3 E7 u4 M% l; ~
- LibraryName=dbexpmysql.dll& i6 f8 a& U) Q/ A7 G( V
- Active=1' _" n0 b+ u! H. {# l+ Z
- ---example----* n: Y7 O2 u+ Q) d$ H' ~$ ]
- - written 02.03.04 by pwk.linuxfan! [( v- s1 Z: J4 ]0 u
$ T8 n: r& ]4 c+ y% y
复制代码 |
|