|
|
麻烦翻译一下,下面这段文章:xhan
+ S7 q' U6 h8 Y9 J; v& s* D4 p& {& i) E
-
M" V9 J/ L, q5 H. z8 U* G - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ t1 I- R: U% {' b& ^+ h( d
3 j' ?/ Q1 A$ O8 K2 l- ### What we need ###
8 {% k8 d( Q' c1 a; ]! n - Naturally, we will need a MySQL server to store the data for us, this document # c) f2 Y1 \& ^! Q5 i$ k
- will not explain how this can be done - there are documents out there for the
$ Z9 }' d7 G' a8 p) `7 u - interested. The requirements include a (empty) database for TeamSpeak to use. d0 i1 ?$ ?3 t3 q% J
- and a user account (username + password) that has the permissions to do stuff) w0 E" \/ u2 V6 ~. U; f
- with the database. Additionally, you will need a vendor library installed on the
# E" Q9 C: p ] - local machine, this came with my MySQL install.! z, r4 {9 ]2 a. b
- These instructions will not tell you how you might transfer your data from the) q: I* ]$ g0 `; p' @. f: d
- SQLite database to the MySQL database, we start with a clean and empty MySQL7 j- V( V8 X% h ?5 t4 y
- database.- r( n4 ]' @. O3 C7 B
- Some users have reported ways to import a SQLite database into MySQL, but at8 h9 q, a- ?! U# a( E$ t& |1 I
- the time of writing, there are still too many issues - check the current status
8 x$ x" J# x0 H4 G0 I - in the TeamSpeak forums if you are interested.2 F' ^- G. u5 H$ C4 `/ q. L; `
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 z% m5 r5 b" _ - Borland was used. This driver can only interface with the client library that 7 [; J2 p6 \# o6 g1 X4 h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 Y# P5 }8 F) k( W1 e' T R1 R6 l - client library - basically all you have to do is to use a 3.x client library as 4 g. {0 A p; x l
- "VendorLib" and a 4.x database to connect to.
* C1 T* a8 ^( j' C9 N: u - If you need more info about dbExpress, you can contact Borland. [0 Q7 [, T2 N& D
; G* R9 _. M4 _- ### Doing the work ###
' `+ p+ H! y8 r0 U Z$ O4 \. w - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" }! s- }$ ?) v% S6 y
- the perquisites right, just open your server.ini file, and add this section at3 Z2 L9 B0 e+ {( v
- the end:; I# ~; B0 S! {
- ---cut here---0 ]1 E4 { D$ N+ W# H- ~1 e
- [DBEXPRESS]3 f0 a5 n2 r. O
- sqldir=mysql_sql! m) C- P" t: g' ?
- Drivername=mysql- z% P! f7 ^& m7 q
- Database=Your_Database_Name_Here, @4 b# |9 J& W, n6 G) }0 r2 E
- Hostname=The_PC_the_MySQL-Server_is_on& a8 u5 P+ R# T1 ^
- User_name=User_name_on_the_MySQL-Server
* V* C4 c( k& L! k2 G - Password=Password_to_go_with_above_user_name# i, a9 K4 R9 T% Y) Y! C
- GetDriverFunc=getSQLDriverMYSQL
* O7 E# ?+ R' @6 d - VendorLib=path_pointing_at_your_mysql_vendor_lib. W. O* }+ W: B* C4 i
- LibraryName=path_to_libsqlmy_libary' e: x" d5 m0 d7 J
- Active=1
3 o9 t; `$ E( A9 Y8 {+ r& B - ---cut here---3 e8 _6 p/ Y7 t7 B* I: W3 ?
- In my environment (a linux box with a MySQL server running locally) I have:
2 D0 E) B6 p- t* o - ---example---
( n2 O0 O' m1 B' t; w* X - [DBEXPRESS]" w0 M7 i( B8 @* w* r# A0 K
- sqldir=mysql_sql# F- O* M! T/ V& ]( ^" `) Y$ v
- Drivername=mysql
5 b( w' D. x( Z! N9 x( l/ i7 w) o - Database=test$ D% C, h% S0 X ^* v) ?
- Hostname=localhost4 O2 W6 [7 @7 h
- User_name=testuser: u* v* m& ]" t7 u. \/ m
- Password=my_password. o Z. M, u5 \3 l* F% b- Y
- GetDriverFunc=getSQLDriverMYSQL# n3 q9 U+ Z6 Z0 a$ U
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) s0 u) Y, F3 W9 T( w
- LibraryName=./libsqlmy.so
" B1 j+ n8 j" j7 e" ~ - Active=12 f$ L: u$ n1 ^
- ---example---7 B) R& ~ L% x- x: U
8 C8 s h$ O+ ?' M9 y( I" v- On a windows box, also running the MySQL server locally, it would be:
8 a0 h; d* @( w- o3 O: W - ---example--- v: D# Y2 J k
- [DBEXPRESS]
- h5 K7 D: U7 e1 t. |9 Y - sqldir=mysql_sql
8 g7 w5 O" w$ i" m8 `- ^ - Drivername=mysql/ X) g5 W H9 Y I% B
- Database=test1 W1 y. q. r# C
- Hostname=127.0.0.1& W+ M2 m' o4 l- S& [( O4 U
- User_name=testuser7 V) v6 W0 @9 I# a! E
- Password=my_password
C( @0 @+ a+ Q8 u - GetDriverFunc=getSQLDriverMYSQL% \8 n0 g: L7 q7 D4 }8 a6 U4 c% d
- VendorLib=libmysql.dll
' z* Y% m) f7 f" x+ {4 g& W - LibraryName=dbexpmysql.dll
" K' b6 H( d/ i+ { - Active=1
+ i: B( l- W# e6 I! Q( y - ---example----
; ~/ t3 Y4 Z( z' b# F - - written 02.03.04 by pwk.linuxfan
4 L/ R: a Y; _$ U% {
; u9 b0 C9 T) ]7 {) a$ T
复制代码 |
|