|
|
麻烦翻译一下,下面这段文章:xhan 1 T' B. ~) o+ k! } x
k. o1 V6 s4 B$ J/ U0 ^$ |
- 1 r3 H z- Z. v8 E! Z; u2 Z
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( o6 y4 O4 T4 k3 P4 S - 9 N7 D* m1 y. u( H
- ### What we need ###" n( L, G: H* M5 K* I: x
- Naturally, we will need a MySQL server to store the data for us, this document ! T; ~2 S/ p" S$ y. H: ]
- will not explain how this can be done - there are documents out there for the
' R% P( c4 } R0 R2 A2 Y - interested. The requirements include a (empty) database for TeamSpeak to use
' S7 Q' O1 m) d1 L, ?: o - and a user account (username + password) that has the permissions to do stuff7 K3 W- z5 S: d
- with the database. Additionally, you will need a vendor library installed on the
4 j0 D, \% W& ?- [# \ - local machine, this came with my MySQL install.% [5 V+ Z# G/ R! h! c7 g! u: B
- These instructions will not tell you how you might transfer your data from the
8 X0 L5 o7 K, d8 B- N& d - SQLite database to the MySQL database, we start with a clean and empty MySQL$ N5 {' N, V3 S8 ^
- database.
5 l# D" X9 I: N# d$ M7 N - Some users have reported ways to import a SQLite database into MySQL, but at" ~' u) G; d$ S. s( W9 g4 Q, K
- the time of writing, there are still too many issues - check the current status$ d, a4 K- m, b4 p
- in the TeamSpeak forums if you are interested.
9 _0 M" T2 G, o% O - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ d m( n+ T. s2 ?
- Borland was used. This driver can only interface with the client library that / f) p0 _$ n1 j0 o v3 d6 C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 S' g& M% e: s. c4 ]/ j C
- client library - basically all you have to do is to use a 3.x client library as {4 q: I: @* W+ U/ t
- "VendorLib" and a 4.x database to connect to." v B: Z- |! a' _6 I/ Z3 @
- If you need more info about dbExpress, you can contact Borland.# g* @. m4 |, z1 O- t
- : [" b! U: l# l2 N
- ### Doing the work ###* o) m" x% p* M
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 n2 x1 {# q* K6 m. ], _
- the perquisites right, just open your server.ini file, and add this section at3 v" h( n& z8 K {+ D
- the end:* K* X, R! f3 A5 X* k2 A
- ---cut here---
- L l; J* }. D7 S4 z& F - [DBEXPRESS]
3 ]6 i5 ~) M6 n - sqldir=mysql_sql" H9 f9 J0 W. D! r
- Drivername=mysql
+ F6 S" P/ l" I" N# H8 S: j; u+ k - Database=Your_Database_Name_Here/ N _2 E3 `0 h: u+ z& f
- Hostname=The_PC_the_MySQL-Server_is_on# t( n0 Y9 w" [+ H" g
- User_name=User_name_on_the_MySQL-Server
, ?0 C1 v1 P. f* A; ^$ x S - Password=Password_to_go_with_above_user_name
* i2 l1 _; o: h" l" O6 L - GetDriverFunc=getSQLDriverMYSQL
& N6 @6 j* @# e( s! Q, m6 k! F$ e- \ - VendorLib=path_pointing_at_your_mysql_vendor_lib* V, O: L; c5 I4 {3 s& @# f8 _- D
- LibraryName=path_to_libsqlmy_libary* t5 k% e2 S" _( s/ B
- Active=1
3 v+ c2 Z$ f, A P! b - ---cut here---
6 ^7 M+ o7 u) Z3 [: w+ T8 K - In my environment (a linux box with a MySQL server running locally) I have:
. U5 E2 y0 a, s - ---example---+ S( _& G% t ~
- [DBEXPRESS]
. i5 }7 q% X* V - sqldir=mysql_sql) _6 B9 p- e) ^% e9 B
- Drivername=mysql, w. q% J( ~( a/ f' m$ O u4 A# c3 ]
- Database=test& V: R) \0 e3 p; c2 g' o( s# x
- Hostname=localhost
7 R% {4 h+ `7 w ^% S - User_name=testuser
- ], T1 e Q6 A* d, e, C" X# k: J - Password=my_password
3 v, i9 h2 T- d1 E( M: Y5 J - GetDriverFunc=getSQLDriverMYSQL
; m' |1 J/ L4 V/ b* b2 M - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0# R- X# x7 p- K! o. Q$ `
- LibraryName=./libsqlmy.so
" a" b. v7 C$ {- z - Active=11 D8 f, x0 \$ k7 m- c- d
- ---example---) k( {0 n3 L/ b% h% j+ V2 J
- 1 o% m+ A$ i1 r# n0 x) t
- On a windows box, also running the MySQL server locally, it would be:
+ \8 x W! Q/ I; d - ---example---
$ w8 s. }: z, B1 f2 n( f - [DBEXPRESS]/ s7 K! B( j1 g0 v1 ]+ C: L
- sqldir=mysql_sql# T' [9 F4 }6 l8 S
- Drivername=mysql9 q: [$ j, C( P# `% ?# ~2 w8 r* J! s
- Database=test& T& f6 |+ j! h3 o
- Hostname=127.0.0.1; ~- {7 y7 J ]5 c. q: \, W+ H+ w
- User_name=testuser
3 ~* Z, J) D# N) E" v* w, b - Password=my_password6 L. N$ Y1 ~$ w) X" l
- GetDriverFunc=getSQLDriverMYSQL
- l% t5 X* T. ~$ x - VendorLib=libmysql.dll
% [' h& m6 \/ X - LibraryName=dbexpmysql.dll
8 s, \6 X5 p" N - Active=16 C. D1 }: ^' l e* V
- ---example----
4 L5 g& r3 _2 }' N2 q9 A - - written 02.03.04 by pwk.linuxfan
7 q4 R6 |4 v! V - + x; y: G1 t5 V" s% D
复制代码 |
|