|
|
麻烦翻译一下,下面这段文章:xhan
" o# F9 ]7 r0 k- q" S+ ^- V! M7 A! g; n2 @. L: |4 x8 G
-
* T' u- S$ k" \0 p$ F1 g - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) F. F. }6 K5 X+ z
- 2 x/ L) S+ Y9 K# L7 Y0 ` N# P
- ### What we need ###9 U; d7 a) G; ]. e
- Naturally, we will need a MySQL server to store the data for us, this document , v! p7 P- v1 S) e) a
- will not explain how this can be done - there are documents out there for the / P3 ~8 s; M" s( o1 @
- interested. The requirements include a (empty) database for TeamSpeak to use
1 r2 k2 S) G' h, _: n6 T - and a user account (username + password) that has the permissions to do stuff% ?6 H% N6 D. D7 r: A( x6 q
- with the database. Additionally, you will need a vendor library installed on the3 e2 z4 |; O2 E6 j9 n
- local machine, this came with my MySQL install.* Z# l3 T7 \9 D/ A' a
- These instructions will not tell you how you might transfer your data from the
5 F7 M" n# q2 i+ |6 I3 M - SQLite database to the MySQL database, we start with a clean and empty MySQL) n9 D# F" |# |. \
- database.
7 x1 |' e. z6 r' G - Some users have reported ways to import a SQLite database into MySQL, but at0 @/ S. P4 X A3 n( b
- the time of writing, there are still too many issues - check the current status% X m& `+ b. G
- in the TeamSpeak forums if you are interested.( p. S( P+ S. a
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from8 K+ B4 c6 v7 \1 O
- Borland was used. This driver can only interface with the client library that
. _% A8 T* ]# Q9 C) d! E9 J! t - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this' G% e# i. E- K) g- X$ l) A! r; E
- client library - basically all you have to do is to use a 3.x client library as
" w6 W! @- T: y' j - "VendorLib" and a 4.x database to connect to.
+ s% f* A2 b% V - If you need more info about dbExpress, you can contact Borland.
+ u) {# f' @; t% k, L) H
+ N, A% a8 N% a. g& f6 Z6 F- ### Doing the work ###
' ^/ x& e, t0 g5 z% r/ d9 r: H - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( y& W1 I, O9 o P2 o
- the perquisites right, just open your server.ini file, and add this section at* O; h2 }' K: T' p
- the end:
& H9 K& ~% p+ R - ---cut here---
- x. R, S# J/ ] - [DBEXPRESS]
' y" [! C) T t, r9 i - sqldir=mysql_sql+ z8 ~7 y' A# g* y2 V
- Drivername=mysql
8 `& k* l3 j' v6 E9 ` - Database=Your_Database_Name_Here- \* o- g9 i$ P* h
- Hostname=The_PC_the_MySQL-Server_is_on
* M; u6 ?2 A6 g- l - User_name=User_name_on_the_MySQL-Server, e2 Q, _/ \. G/ h5 G# K; X
- Password=Password_to_go_with_above_user_name b4 D* Z4 _$ G; e, s% q8 M
- GetDriverFunc=getSQLDriverMYSQL( S" T4 d2 ~, P. ?, P
- VendorLib=path_pointing_at_your_mysql_vendor_lib" Y: X& G2 b1 Y9 _4 d& H; X
- LibraryName=path_to_libsqlmy_libary! t$ C5 @5 w2 s9 F1 J: X0 u {
- Active=1 U. }- A3 [( o" H" ^* c
- ---cut here---8 S1 l- K6 D. q" X9 O2 m, o' g9 C
- In my environment (a linux box with a MySQL server running locally) I have:
7 r1 t, ?1 H+ a3 f2 V - ---example---4 {9 \9 Q# ^& _' h
- [DBEXPRESS]- }5 w G, C' e
- sqldir=mysql_sql
8 K- T S; r# j8 P3 H0 K( D - Drivername=mysql
! [# S1 @5 }$ x F7 J- p8 K - Database=test9 a: |( X+ x7 _2 ^/ B
- Hostname=localhost' d4 L' t& d7 y, O! v8 T
- User_name=testuser
6 R/ E5 J1 a# Q( E) U; n - Password=my_password; c' _ l7 c$ h. ^. ]" ~5 \
- GetDriverFunc=getSQLDriverMYSQL7 p" }! u5 c( s: r+ g+ f/ s
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" b* Q M n3 [' u; c. c5 y# ? - LibraryName=./libsqlmy.so! U' c7 A2 c a, a7 z! D# d' t
- Active=1. s9 h7 Y8 O% }5 f( z$ m% I
- ---example---
6 X) N( u" u( a7 }( W1 }$ |, p
& d# z7 W* z( q1 W6 R3 f) a- On a windows box, also running the MySQL server locally, it would be:; Q1 w* Y" d' Y2 E" P4 |/ C) U. _
- ---example---0 g' O I8 x/ T* z' o5 v) S
- [DBEXPRESS]
& T' D1 o1 e' X# ?" Q1 c! k - sqldir=mysql_sql
/ d) c, B8 O" R - Drivername=mysql
; Y; f7 n! l/ W - Database=test$ M! X' A0 U+ A) T
- Hostname=127.0.0.11 H1 E% @0 z$ R- ~8 b% c
- User_name=testuser
4 \) f3 A$ i% a# T( f' h& { - Password=my_password
. P! D/ ]. R* M9 l( o/ T% _; P9 t - GetDriverFunc=getSQLDriverMYSQL# \! J* ~1 `# O4 E) J
- VendorLib=libmysql.dll/ j. ?6 N, K) A; e
- LibraryName=dbexpmysql.dll. F- l8 s/ F6 X
- Active=1
& t. ~/ E0 f3 a: l7 D ^0 J - ---example----
- g8 A3 `0 ]& P/ M+ a - - written 02.03.04 by pwk.linuxfan9 r7 O# Y) }+ h* f8 V9 p" S* P
- ( O+ p2 p/ l$ ?' j/ a
复制代码 |
|