|
|
麻烦翻译一下,下面这段文章:xhan ' A# N- C# ~! w
: s8 Y. q! u ]" L) U: S" U w f-
+ g2 H1 M" s9 k# o- |# I - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; O9 X* l# i& Z - ' W' V& O0 b w/ l- }
- ### What we need ###$ F$ k& R2 j" n6 ^
- Naturally, we will need a MySQL server to store the data for us, this document
0 S% ]# n* Y* j$ F9 L9 ~ - will not explain how this can be done - there are documents out there for the
& \/ h" J, S/ ^0 |1 p, T( a) m7 ]/ E - interested. The requirements include a (empty) database for TeamSpeak to use
9 p; _/ s" d" k g( ?/ o - and a user account (username + password) that has the permissions to do stuff( a& o3 i! e Z' Z2 B) y. [
- with the database. Additionally, you will need a vendor library installed on the
$ g5 I, p! O9 k. \$ j' L - local machine, this came with my MySQL install.) [6 Z4 W$ `( d& C
- These instructions will not tell you how you might transfer your data from the
. r$ P9 f" D6 b$ a* s) x c( d - SQLite database to the MySQL database, we start with a clean and empty MySQL
( b' p8 F6 T4 k4 L+ M. \ - database.
: ?" L# z- P$ k& ]6 {3 b- [ - Some users have reported ways to import a SQLite database into MySQL, but at
& U& D5 U) ?. Q) x9 T( G1 F - the time of writing, there are still too many issues - check the current status1 A) U6 E1 [4 ^, w
- in the TeamSpeak forums if you are interested.! C, c( b# g+ W) R0 \" l3 A
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 _1 a+ ]/ H0 J4 J/ l( F) C1 A1 H$ \* W2 j
- Borland was used. This driver can only interface with the client library that ; p7 \3 B, G: d* B* q( j
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
/ w; [8 x% ] N: n) l3 \! l - client library - basically all you have to do is to use a 3.x client library as
9 ]( u' b; v: ?8 \ - "VendorLib" and a 4.x database to connect to.6 N: H+ G6 c M
- If you need more info about dbExpress, you can contact Borland.& S W" c7 {2 g @" K# x0 k, w
- . e" S7 {7 w" ?8 {! @! w& K
- ### Doing the work ###
; V; H3 ` r5 p* H f/ A9 ~, Q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# \8 c1 j- Z7 W# c" a - the perquisites right, just open your server.ini file, and add this section at/ y2 i$ e( H" e! w9 k9 p$ q
- the end:
% w) i* Q/ p0 a: T1 ? - ---cut here---( C1 S1 s8 o4 b6 L/ g9 A( w
- [DBEXPRESS], R N1 u! H; I
- sqldir=mysql_sql! O/ {, |+ d0 F
- Drivername=mysql
* F- H \( `5 h9 w1 u - Database=Your_Database_Name_Here
9 N2 b5 Q( L$ d' \+ r6 t% E - Hostname=The_PC_the_MySQL-Server_is_on
; \& s2 k. O' v4 {) y2 ]5 N- c. j - User_name=User_name_on_the_MySQL-Server
' @4 l l* I3 z/ W! C - Password=Password_to_go_with_above_user_name
# ]3 o; L' ?& n3 k* Z7 ]3 L8 h9 } - GetDriverFunc=getSQLDriverMYSQL
/ y1 {3 |& W3 c( w8 w - VendorLib=path_pointing_at_your_mysql_vendor_lib
0 T8 t: ~0 B, T' {4 B0 B& L - LibraryName=path_to_libsqlmy_libary" z# K& o6 w7 [' R
- Active=1
( x) F( |+ z- w5 ? - ---cut here---$ Z; G0 _- _. ]
- In my environment (a linux box with a MySQL server running locally) I have:. G# @: A' Z f. l1 R; S
- ---example---
3 S3 R2 `+ A9 p: f - [DBEXPRESS]
8 B/ V0 t! V, y5 } - sqldir=mysql_sql
: C& U2 r D* ?& r( \% x - Drivername=mysql! C+ k' S: q* e
- Database=test
5 X2 j' `8 L: U: p) _8 m' A - Hostname=localhost
) C d5 O u. y( E9 r; }% n+ N# e - User_name=testuser
+ W; \" S" M5 H4 Y; t - Password=my_password5 e' x: I' h8 \3 j
- GetDriverFunc=getSQLDriverMYSQL
5 q. S* ?8 ~6 {& T3 w# z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.04 l* x9 L1 }# g/ r( @5 [5 ?6 f7 o* q6 K
- LibraryName=./libsqlmy.so
/ |+ N: E+ l! `1 v* _ - Active=1 x' S5 B9 H- p2 F
- ---example---! m' }! J3 E- I2 E9 R
6 N4 t* _( R8 q* ]/ \* S- On a windows box, also running the MySQL server locally, it would be:- K+ t8 I! m* V/ |
- ---example---
9 W7 y0 X/ ~6 z( n: Y( }# H* P - [DBEXPRESS]
0 D5 [/ @6 r+ x/ \* b- e6 v4 H- G - sqldir=mysql_sql- i7 K3 r2 x- B/ |
- Drivername=mysql
4 o1 B. q. c9 z; Z* j9 b. r* F - Database=test4 T* Q; F& n m& Z0 {. A4 g
- Hostname=127.0.0.1) F$ F: ]0 u+ `: `1 @' ~& Z9 k
- User_name=testuser
2 ~% m% e! ^2 t0 m, x! U: `6 P - Password=my_password
; V1 g- A" s, T$ `/ @3 m - GetDriverFunc=getSQLDriverMYSQL4 E1 U V9 M5 l4 Z' S" r1 ]
- VendorLib=libmysql.dll
1 D! a" h2 P, _$ Y8 H - LibraryName=dbexpmysql.dll( V8 H5 t) f$ I+ X# b! N
- Active=1( z% K( o2 T% x
- ---example----
6 }# K- B# a. E3 O& j" N3 l - - written 02.03.04 by pwk.linuxfan
* z$ w5 a) z- ~. ?1 P
" M ]' t3 ?) y0 Y6 `$ {1 r
复制代码 |
|