|
|
麻烦翻译一下,下面这段文章:xhan
3 T V& b6 D' b: X
2 U& B8 N2 p- k: N2 `% _- / E4 k, Q' a* Z* n
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ B# a" S4 i2 k
- " V' H3 s: f' B( z( o
- ### What we need ###
' R7 M/ t, k$ O$ s, n& \: O - Naturally, we will need a MySQL server to store the data for us, this document
0 J3 E# ^- h) r3 P - will not explain how this can be done - there are documents out there for the . r7 @8 y8 k% {! T) d$ W
- interested. The requirements include a (empty) database for TeamSpeak to use# L$ [, f* V$ X2 c4 P! h
- and a user account (username + password) that has the permissions to do stuff
' i5 c- n" T: B) M& Q: G - with the database. Additionally, you will need a vendor library installed on the
! R9 g7 n( ?4 w- x6 l- o - local machine, this came with my MySQL install.. x5 L& M+ J1 t& G/ A
- These instructions will not tell you how you might transfer your data from the
( {& U5 M# ?2 c* A) i - SQLite database to the MySQL database, we start with a clean and empty MySQL
( O- |$ |0 {* J/ ^8 M - database.) E& t+ F# c$ H$ N- y$ [
- Some users have reported ways to import a SQLite database into MySQL, but at
; m8 ]+ R" R: K* y# k9 D; J - the time of writing, there are still too many issues - check the current status0 Z) L' |( [3 u5 E% e
- in the TeamSpeak forums if you are interested.
6 y1 x. Z! D% Q( ?8 K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. ]& L) M7 }. C" g3 [+ I - Borland was used. This driver can only interface with the client library that * M. A$ N: O+ R# T
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ W& H8 W9 v7 ^5 v0 ^. R; l f( } - client library - basically all you have to do is to use a 3.x client library as ; j, z1 W6 W9 ~, Q
- "VendorLib" and a 4.x database to connect to.* W5 s X7 R* M, w) b
- If you need more info about dbExpress, you can contact Borland.1 R9 p3 B7 \+ h/ T; w0 Q/ B* j
# I! t) ?% J! O5 [6 r- ### Doing the work ###
: G( b2 m6 B9 F( A3 s - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 `; B. ?3 Q# v' V8 [( |! l' g
- the perquisites right, just open your server.ini file, and add this section at5 a( C- w! }" f9 I8 E3 P
- the end:
0 M) X9 Z: {/ A4 W( x2 [; Q P - ---cut here---
, v8 j+ r' A/ E8 o - [DBEXPRESS]; k( s5 v: R+ k$ e
- sqldir=mysql_sql, t7 o# x% ]$ W/ O( m8 B# h
- Drivername=mysql
* n. U+ [- k! Z% e# E5 I - Database=Your_Database_Name_Here3 \7 Y; \* i( o; X* K: Y
- Hostname=The_PC_the_MySQL-Server_is_on
Q7 i1 w/ R3 i# i ] - User_name=User_name_on_the_MySQL-Server
" K! |3 r' c5 F H9 m: n0 W8 J - Password=Password_to_go_with_above_user_name/ b" F; g/ _" v* X# ]+ M) W) p
- GetDriverFunc=getSQLDriverMYSQL& o$ v1 I& Z G2 \; c
- VendorLib=path_pointing_at_your_mysql_vendor_lib
* h: g; N0 C8 c: C5 Z+ |! w+ l - LibraryName=path_to_libsqlmy_libary
0 ?3 |/ c' P7 Q" s% W. ~1 h$ E4 { - Active=1
. V1 t0 ?. n" l: O - ---cut here---
( `) t: x4 F0 m- U - In my environment (a linux box with a MySQL server running locally) I have:
* j! V0 R' o. G* Z) R - ---example---2 g6 m: d j; W ^/ U: P
- [DBEXPRESS]
" X, N' L) S6 R6 x9 I# j - sqldir=mysql_sql, P( w, T; U& D B7 I1 I
- Drivername=mysql
+ ]" J) N3 n# t5 c ^+ d - Database=test
. U ]% o7 ]6 ^3 S8 g0 M - Hostname=localhost! B0 Q- w9 k( z# H8 D
- User_name=testuser. m3 N$ S: F* l
- Password=my_password5 U* k0 A. Z F9 } U4 |
- GetDriverFunc=getSQLDriverMYSQL1 s+ O' L. i, Q8 w; u' I% S
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
& o( w9 `' y% x% `& o9 q - LibraryName=./libsqlmy.so
7 v4 j+ L3 D! a! j- k* n( V: ~3 [ - Active=1/ ?4 E" ~; w- ~6 Y+ X, E4 x; Z) P
- ---example--- z; R( C) n6 J# q8 R, B
- + F9 S, t/ ^; k+ j8 y
- On a windows box, also running the MySQL server locally, it would be:
: ]* T6 a% x8 V" O. y" W; i7 ~) O - ---example---
/ B' T7 g1 o# d) Q$ `4 F - [DBEXPRESS]2 q1 {* F* X4 X- z- n; L+ L/ G
- sqldir=mysql_sql* {& {. B$ Y# Y& H
- Drivername=mysql2 }3 M1 r" \) G5 g: l" }
- Database=test
9 y- z; l! {3 k* l - Hostname=127.0.0.15 x& F$ v2 F, }) G
- User_name=testuser
( J/ Q) A& X, B5 j - Password=my_password
9 s; ~( P& P$ ~% t - GetDriverFunc=getSQLDriverMYSQL- @! @+ [. r9 x5 ~7 i K
- VendorLib=libmysql.dll5 E* t! o! {( g9 }
- LibraryName=dbexpmysql.dll
( Z4 _, R3 d0 q - Active=1
% A3 C! X3 V2 t8 D# Z) B - ---example----
' o" R7 w, P; ]. p - - written 02.03.04 by pwk.linuxfan# M5 b; N9 M' @
- + B2 R* d* C& E
复制代码 |
|