|
|
麻烦翻译一下,下面这段文章:xhan $ r& G* g# d$ a: ?7 U
- M0 u d) D4 Q-
4 @7 w6 G/ T3 Z R- w - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# Y' G* y4 q7 N3 S# N8 r$ s
8 r5 C6 ^4 \% i" K' I) L$ h9 t) s( x- N- ### What we need ###
& l& S* }" |6 q: y - Naturally, we will need a MySQL server to store the data for us, this document / N) \" F7 w9 @
- will not explain how this can be done - there are documents out there for the
! c& \' d5 c/ D# U7 X - interested. The requirements include a (empty) database for TeamSpeak to use
; p9 w! M) f; j& X0 Z T - and a user account (username + password) that has the permissions to do stuff
+ g$ y0 R' K+ t" { - with the database. Additionally, you will need a vendor library installed on the: O; U# I0 [$ U- t. O* F2 W: \9 R6 S
- local machine, this came with my MySQL install.4 _6 E& u$ V+ k3 B! |
- These instructions will not tell you how you might transfer your data from the3 G* @. d" S9 a; d
- SQLite database to the MySQL database, we start with a clean and empty MySQL
2 W, {& W: H, { - database.
& F) G" t$ s+ x( p - Some users have reported ways to import a SQLite database into MySQL, but at
# N" Z- n! r( _* z, ?2 a - the time of writing, there are still too many issues - check the current status' q. ~! c% A& o- y L
- in the TeamSpeak forums if you are interested.
- ^ `% G+ O: V3 J- R& a - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) Q5 u7 k" f& p! I! a( l
- Borland was used. This driver can only interface with the client library that % J9 p$ p- h1 X5 ]( r
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ |* ~8 P/ T( ]9 k" J7 f. d
- client library - basically all you have to do is to use a 3.x client library as
- |7 ^$ M* H) h/ ~ - "VendorLib" and a 4.x database to connect to.
8 K% ?& c- t, x" R - If you need more info about dbExpress, you can contact Borland.) b( L0 L( w( B
- 4 f6 m, t( F/ n* Y1 @% n- {' t
- ### Doing the work ###
9 R+ J8 t D C6 {/ f$ h" f - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: r, C; q: Y, R/ o/ k# M& e
- the perquisites right, just open your server.ini file, and add this section at" f. m3 _1 k( \. \" @% @9 @/ u7 y
- the end:
7 |1 z/ `) v1 U N: Q. u - ---cut here---
1 i8 m* W8 c8 C - [DBEXPRESS]
* Z: z2 U9 u0 X( x' N - sqldir=mysql_sql* \4 J7 z; T- Q$ L7 _
- Drivername=mysql
. e; m1 H5 l4 g - Database=Your_Database_Name_Here m$ m3 ]9 H( r% ]8 d
- Hostname=The_PC_the_MySQL-Server_is_on
- u5 D) N8 \" N) \1 u - User_name=User_name_on_the_MySQL-Server3 _: M* `% ?2 }
- Password=Password_to_go_with_above_user_name5 } |. [2 U+ N) K+ \: O) l- T2 N& H
- GetDriverFunc=getSQLDriverMYSQL
* T V. f s1 L, C - VendorLib=path_pointing_at_your_mysql_vendor_lib
8 F3 `6 N0 E8 [9 v F( { - LibraryName=path_to_libsqlmy_libary3 a( B+ s9 C" b0 Z3 G: k1 T
- Active=1
9 l7 w: h& V) t8 U7 g, P: X5 o/ B; f - ---cut here---& @) e) s# e/ ?6 A) q9 u6 W- k
- In my environment (a linux box with a MySQL server running locally) I have:
8 g9 ~+ J: M0 O$ E5 a& s" ~' E# \ O+ M - ---example---
8 ~) o$ m# r" c6 w - [DBEXPRESS]
5 p+ {! Z; f# K3 ]9 ` - sqldir=mysql_sql8 t5 L! u9 H- t+ g7 Y
- Drivername=mysql
$ d9 x3 F4 m# f/ ~. H; b - Database=test8 l$ F# Q9 P' J
- Hostname=localhost
. @: h* P% U& ?0 K* ]+ {) w - User_name=testuser
( E# h: Y g) `/ l" Y/ J3 @ - Password=my_password
) ]2 x$ L( ?! E! u1 ?4 ]% i - GetDriverFunc=getSQLDriverMYSQL. e9 Z5 D0 g( @! Z9 G; J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" S% Z4 A5 u5 k7 ?+ c- {/ i% q
- LibraryName=./libsqlmy.so1 ^& I' x- b* e
- Active=1
1 L" I: X- a9 b! ^( z - ---example---; Q3 R3 \3 v+ N- `- ~
- " u2 i) |3 }" s/ y
- On a windows box, also running the MySQL server locally, it would be:
1 r9 Q: m; n5 {5 U/ q. O - ---example---
- `7 x0 k9 h6 e0 P. Q - [DBEXPRESS], p5 Z5 L5 C$ U# d, W8 ?
- sqldir=mysql_sql+ R& r3 u' D9 z o
- Drivername=mysql# b2 P# ~) m+ z4 t- h
- Database=test
0 B7 m, X. o. w3 i9 O5 p - Hostname=127.0.0.16 o k# ^5 g5 C% Q6 A% q
- User_name=testuser
3 C) m8 l5 O/ C3 T& k% R - Password=my_password
8 d! v7 T. _" u. h8 T - GetDriverFunc=getSQLDriverMYSQL( s: d& g: \- K( i5 \7 Q
- VendorLib=libmysql.dll
. v: `5 R0 n l& A - LibraryName=dbexpmysql.dll$ R$ F7 S0 k- q
- Active=1
S" c4 Z0 k+ N( @ @ - ---example----
# y/ G, V1 r$ R* O6 k* H - - written 02.03.04 by pwk.linuxfan. k& y j6 t- w4 F$ m" F3 t
- ; @" J! t+ \0 t& d* T B
复制代码 |
|