|
|
麻烦翻译一下,下面这段文章:xhan 1 O. ~ [: A3 m( Q' S! F" ~
" u% h( {- e3 r" O7 x-
* K9 ]! M Z0 G- n7 W! |6 G2 e. E - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 ^: u5 O. [( X2 E7 @, i: k- Q! K
- 2 `, {# _2 G( e" R' }9 r
- ### What we need ###) n4 e4 a/ k8 C9 x5 j' V" V- X
- Naturally, we will need a MySQL server to store the data for us, this document - c# U; ]2 P, i+ h2 B6 ]
- will not explain how this can be done - there are documents out there for the
& k# g: ]- `2 T; _5 H% J - interested. The requirements include a (empty) database for TeamSpeak to use, p4 R/ \$ h+ C; d4 v
- and a user account (username + password) that has the permissions to do stuff
& S0 }" w' O. R8 ^+ O! c Z - with the database. Additionally, you will need a vendor library installed on the7 R& P6 c# ^$ n$ Z9 [1 Z9 ^
- local machine, this came with my MySQL install.
4 O/ n0 u9 e4 e, u$ u6 W - These instructions will not tell you how you might transfer your data from the
- R, S0 O, i% K; ]+ I( b$ U - SQLite database to the MySQL database, we start with a clean and empty MySQL
- T4 A7 R7 Z2 T3 g( \4 @ - database.
: H4 M( _7 N& Z - Some users have reported ways to import a SQLite database into MySQL, but at
; c6 u$ K5 u* s) r - the time of writing, there are still too many issues - check the current status
7 z5 H A9 k9 l$ l - in the TeamSpeak forums if you are interested.
6 r, L7 P7 o* h3 s - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- ^. w3 U* g& ]4 _3 ~+ \( R* S/ [ - Borland was used. This driver can only interface with the client library that
* [( T J6 H6 ?1 P$ c: t& p4 m9 k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# k/ o* q- r, _2 u* s U/ q - client library - basically all you have to do is to use a 3.x client library as $ m* v, w* i2 |+ a' z( v8 @6 T
- "VendorLib" and a 4.x database to connect to.
+ Z$ I* Q/ x2 f r - If you need more info about dbExpress, you can contact Borland.* L# V4 r; x4 e
- A. w. O. r5 H* k" A
- ### Doing the work ###
" I& f0 j# ?) j - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
" X) Q8 y: W" g6 R5 x1 D% q( p: ~ - the perquisites right, just open your server.ini file, and add this section at4 m3 j( z! o: O
- the end:
: z6 H8 X5 O3 R& F' W - ---cut here---
9 J5 y, l/ i' y7 @# a9 V - [DBEXPRESS] T0 e" \! f4 R- |2 _- C
- sqldir=mysql_sql& o" f1 g9 Y" O( H
- Drivername=mysql$ l" n; t5 V! ~" g' v% O( M4 B2 H8 b
- Database=Your_Database_Name_Here9 R: c7 S [: |6 b; a: c& p
- Hostname=The_PC_the_MySQL-Server_is_on0 C, h7 X( C. S6 `
- User_name=User_name_on_the_MySQL-Server
; m, s8 C# P5 O2 O% z x - Password=Password_to_go_with_above_user_name
5 {' b# @' J) b' Z# e! z1 I - GetDriverFunc=getSQLDriverMYSQL" H, U; ?, `- D$ a3 z) q6 t, k
- VendorLib=path_pointing_at_your_mysql_vendor_lib
( o" Z. w m( k6 q% _ - LibraryName=path_to_libsqlmy_libary& U4 [* M2 u3 N, R
- Active=1! \9 ` E6 x7 O { {
- ---cut here---3 f4 W. }4 {; x8 f( {: K- U9 i
- In my environment (a linux box with a MySQL server running locally) I have:
/ T* w) `) o% ` - ---example--- ^$ z# x+ j- E' V1 H
- [DBEXPRESS]& T4 [- B, I3 j0 x
- sqldir=mysql_sql
* d8 F' b7 L# q0 |2 e* N& ~ - Drivername=mysql
5 A- R" P8 L- k: w# N$ j2 F - Database=test" K' M4 j {' h5 }
- Hostname=localhost
- [" Z7 X. L9 } - User_name=testuser
. m3 g0 r; U9 B9 e) M( O" w - Password=my_password( s( J: m Z2 M# K" M
- GetDriverFunc=getSQLDriverMYSQL9 v8 v4 p. G5 z3 W9 N- o- V
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* l ]' k9 P6 ?$ G% G( u3 e" x: ~
- LibraryName=./libsqlmy.so2 z8 y, M1 ^/ {# t/ g! {* z! a
- Active=1
0 a! ?' |5 | B4 F - ---example---0 R# ?5 d7 c5 {* n
# W# E, b, X6 J- f- On a windows box, also running the MySQL server locally, it would be:5 b- g+ D, \/ S' _; `0 J! L
- ---example---
" A" u o7 O8 C- x4 M& k3 O# V - [DBEXPRESS]
0 }! N1 m* r3 u Z3 j" C6 H! v - sqldir=mysql_sql
W2 c/ K; v6 V7 I5 a - Drivername=mysql
. Z+ k$ D) e6 \$ N6 S+ b - Database=test
2 K8 X. S' P& V! W - Hostname=127.0.0.1
, v: U0 D( d6 P! g' p - User_name=testuser
( j( a: I V* p5 R. ] - Password=my_password
2 l! {, y# i" v- A V - GetDriverFunc=getSQLDriverMYSQL2 ^& ]+ M& N3 R& V. X& h' f
- VendorLib=libmysql.dll
9 s6 d0 g( q2 p R0 k2 A - LibraryName=dbexpmysql.dll
' H- j0 a$ h) r: \ - Active=16 I+ s* l6 h9 F& w0 r/ A
- ---example----1 T% p6 e" w, B* I d, w" K0 d7 t
- - written 02.03.04 by pwk.linuxfan
; Q8 N- f, P3 i1 n - ; p* S. ^# q8 v$ p
复制代码 |
|