|
|
麻烦翻译一下,下面这段文章:xhan . J+ l( H, t# D+ K# z8 W
) m. ]$ \3 N5 Z2 m- v- G$ b
-
6 T/ U" l0 h. a4 p/ e* b- o - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ###### M( I6 u, w* `$ t
- M$ n9 Y1 C6 i6 _
- ### What we need ###
9 u! W% y8 M. r. n" _1 v$ b( d, J - Naturally, we will need a MySQL server to store the data for us, this document # y8 X4 l+ |2 a/ c! J& _" C* _* r
- will not explain how this can be done - there are documents out there for the
$ F) r7 T& D3 C - interested. The requirements include a (empty) database for TeamSpeak to use
B5 x" p. X- ?; [; j+ { - and a user account (username + password) that has the permissions to do stuff
( n' \. S! s0 _* E - with the database. Additionally, you will need a vendor library installed on the
- W2 H1 M7 j2 [, u/ P% r - local machine, this came with my MySQL install.
& w b! G4 B7 _& o$ k" W0 a% C - These instructions will not tell you how you might transfer your data from the* Q9 t& w' }+ e v- j B
- SQLite database to the MySQL database, we start with a clean and empty MySQL
: X n) o0 Q8 B7 I' g - database.0 {; h+ ^1 X% F
- Some users have reported ways to import a SQLite database into MySQL, but at/ y7 q2 }1 |1 }
- the time of writing, there are still too many issues - check the current status
% F+ l0 ?+ g B b) X - in the TeamSpeak forums if you are interested.* ~" p& t& ?' n! u% i; z
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
a$ t/ v0 H7 i) s2 M4 R - Borland was used. This driver can only interface with the client library that * A5 ~+ @) v' }* C. T C9 Y/ C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 [8 ~: g5 _0 R- e: }2 p
- client library - basically all you have to do is to use a 3.x client library as
) u8 f0 [; u- ^! Z+ h( L, `* m - "VendorLib" and a 4.x database to connect to.
7 Y5 i, u9 j9 T% }1 b* G - If you need more info about dbExpress, you can contact Borland./ X5 K" C' F3 e
& r/ C2 c% n6 E9 e4 t' ~- |# [7 G- ### Doing the work ###
; m9 T2 J( l& V2 L4 k - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 E+ Z7 w$ _1 R! h1 f( X
- the perquisites right, just open your server.ini file, and add this section at
8 E* F* }+ C. k. O - the end:" }( X# @+ g7 t1 v+ z/ J3 g
- ---cut here---6 `3 q: K5 @8 a: @. ^
- [DBEXPRESS]
. h- _5 o* N( W0 Z- [ - sqldir=mysql_sql& N/ O1 E0 |2 {# Z" \4 ]" f
- Drivername=mysql7 i: r3 _# C$ M* s; `' ]
- Database=Your_Database_Name_Here
% j$ ]' g3 X3 _* R - Hostname=The_PC_the_MySQL-Server_is_on
8 f% ^. ~% m& m" u: S1 i - User_name=User_name_on_the_MySQL-Server ]2 \% h$ H" e" g
- Password=Password_to_go_with_above_user_name
; G+ [! B" \: z5 h - GetDriverFunc=getSQLDriverMYSQL/ {1 X/ z" o! y! l4 R+ q
- VendorLib=path_pointing_at_your_mysql_vendor_lib+ T$ O& U6 I& d" _, T' Q! I2 g
- LibraryName=path_to_libsqlmy_libary
4 o) V, C. H* R/ J; w! l8 w4 i" P; s - Active=1
2 x4 K+ z' t4 m8 r; p: f6 H; l# ]) Q - ---cut here---# Z, ^% [% Z/ B' o# q
- In my environment (a linux box with a MySQL server running locally) I have:
" t" G6 f8 y' V3 x* z - ---example---% s2 G# T- E- j. A) o3 k
- [DBEXPRESS]& a$ D! U, J4 k5 q1 J. h7 r- n7 |
- sqldir=mysql_sql
4 P0 L! }+ l' H2 d - Drivername=mysql6 ~) C b: s1 k6 Q! A: v6 r' c& t
- Database=test
& L3 V. Z/ u& ^ - Hostname=localhost
. u$ E* I. c8 Y! ^; w - User_name=testuser" q1 U, R3 e+ ]# Z$ I+ V5 ~; ^' `; f
- Password=my_password
: F- _) }5 K) I) q' [' C5 } - GetDriverFunc=getSQLDriverMYSQL
& m/ w. T6 v, Y) A. P - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) B4 V, A! o, B7 w3 r! F7 ~
- LibraryName=./libsqlmy.so
2 i4 F* ^. J: {: n u; X% _ - Active=1
* {" G5 K& {+ \! @# I - ---example---4 B3 ~0 _+ i% \. J) M& K! H
- * X1 s$ T3 l: ]0 x/ y6 l
- On a windows box, also running the MySQL server locally, it would be:
" W* |2 P/ f0 P1 H [: c - ---example---3 W, P! _& V/ p1 O) |7 }5 F
- [DBEXPRESS]
G7 v# ^1 K" C+ o - sqldir=mysql_sql
3 ?7 x) Z. ~4 ] J3 p) o6 } - Drivername=mysql% u- p1 j* e; Y0 [$ y) [
- Database=test' {+ z8 w( ~& B, s" c( ~- }
- Hostname=127.0.0.1
" ?- i; ?; ]8 o/ o4 G - User_name=testuser
) i( c) X1 z: o; Q - Password=my_password, [4 ]& I. g7 ?( V) z* J- t! x; j
- GetDriverFunc=getSQLDriverMYSQL
7 z m/ y) V1 f( Y - VendorLib=libmysql.dll( K* ]3 g* w% ?
- LibraryName=dbexpmysql.dll
J4 q6 h7 ]* k' G; O5 J" p - Active=1
2 q/ C6 f+ C$ ~8 y8 { S. } - ---example----% m8 D3 [. X1 l" e3 u
- - written 02.03.04 by pwk.linuxfan0 ^6 _( O5 c( L1 c
- , Q6 y) e4 l' N. q5 l& u
复制代码 |
|