|
|
麻烦翻译一下,下面这段文章:xhan j) O# n% t! U
8 T" v$ F- `$ t- }* E. O-
1 z* ^; ]1 m9 z; U& v - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 d0 |. D. V- I
- ) q! }8 f$ n" {1 L) z [
- ### What we need ###0 o2 O' y1 S( ]! q5 n* _& t
- Naturally, we will need a MySQL server to store the data for us, this document / t9 ^! c% b; `
- will not explain how this can be done - there are documents out there for the . O+ T8 _9 {, L# G/ f
- interested. The requirements include a (empty) database for TeamSpeak to use
2 p6 _! A" m; [- B( F: m; S - and a user account (username + password) that has the permissions to do stuff; E! J' ]: ]2 T! ~7 o4 B; L
- with the database. Additionally, you will need a vendor library installed on the* e) T& R# V4 D# B2 Y! v8 D9 x1 L
- local machine, this came with my MySQL install.2 a5 D E' F8 H4 d- F" y
- These instructions will not tell you how you might transfer your data from the
+ W; s1 W7 j: C3 O% C6 a - SQLite database to the MySQL database, we start with a clean and empty MySQL0 `8 J8 W( f; o) d
- database.
" c6 p/ B8 t3 C3 N2 @6 } - Some users have reported ways to import a SQLite database into MySQL, but at
" Z; {$ A) G) \ - the time of writing, there are still too many issues - check the current status
. y8 C0 Y* {, x) P - in the TeamSpeak forums if you are interested.1 x: m) v7 n1 x! ]: K0 I
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& X* }* t9 A2 ]* E1 z. |+ F' Q$ {& \
- Borland was used. This driver can only interface with the client library that # U/ D0 J5 T- v& ]7 N' U. [' P0 |
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' ?$ Y" ] \7 F" K& H# U' e - client library - basically all you have to do is to use a 3.x client library as
3 ]% g8 N3 N1 n! L/ c. R* F - "VendorLib" and a 4.x database to connect to.2 r. e+ s% f" j& m+ Q. ?" S
- If you need more info about dbExpress, you can contact Borland.
* v' K+ e1 k. z' n - # m* {/ b+ {# u; ^) ~ K
- ### Doing the work ###
* X% R8 F# C0 J% M6 n - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' Y" d/ y! b h: C - the perquisites right, just open your server.ini file, and add this section at3 b0 p |+ x, ?! }6 V$ T3 A
- the end:% P) G) _( x( [ {# g# y; Y
- ---cut here---' |7 [1 w, q9 @! ^
- [DBEXPRESS]
2 P! j7 n1 c3 V. T0 O - sqldir=mysql_sql
% q# V" j- F; X9 h9 P7 P- H - Drivername=mysql
5 @7 e+ G1 W6 X - Database=Your_Database_Name_Here
# I( k* L9 Q& e! E' v' W - Hostname=The_PC_the_MySQL-Server_is_on
2 ^8 b) x T* T/ D2 d/ |! f - User_name=User_name_on_the_MySQL-Server
. V# ]% G# V. u8 ~4 x/ J - Password=Password_to_go_with_above_user_name
: i. G K- {8 @4 N" W& K - GetDriverFunc=getSQLDriverMYSQL
" [4 j4 s, h, x( @ - VendorLib=path_pointing_at_your_mysql_vendor_lib5 n) i/ O, u- I! w O
- LibraryName=path_to_libsqlmy_libary
: I! ~, e j! H5 r+ s' r( r) O$ V - Active=1
\4 u/ b% d% D: [' f - ---cut here---! L2 X6 F) D2 i2 ~+ b4 c+ W
- In my environment (a linux box with a MySQL server running locally) I have:7 x2 Q/ Y- }$ s, w$ Q0 B) c3 b. k6 E
- ---example---5 i" ^* I) S& I- M1 [. i
- [DBEXPRESS]4 o& A7 k/ t# T% W$ J- V/ y! d
- sqldir=mysql_sql
; ~- \0 x( y( D% v3 \: h/ \ - Drivername=mysql
' v# _+ R2 |& r0 c2 w6 J t. N - Database=test
m" M6 s Y3 |5 t/ C* |$ A/ ] - Hostname=localhost
6 e1 ~+ ] b5 p0 ]/ k ~ - User_name=testuser
: K! C2 ]! ?$ W) [2 \# A8 v - Password=my_password3 N. ~9 ]1 E8 b6 t" Y' K0 y) r
- GetDriverFunc=getSQLDriverMYSQL6 y* A- q$ x2 U9 x0 z5 Z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
$ ]. }9 H6 a: p6 I8 w& v - LibraryName=./libsqlmy.so" f5 q% U2 b0 A- p) \6 P
- Active=13 M( U* o- `" K r7 T! n, n( F1 m. U
- ---example---, d0 i. |( v! \* C0 E
. ^5 @" J- {. l+ B6 q v! G/ w- On a windows box, also running the MySQL server locally, it would be:
" ~* U/ h0 M3 E" f/ L4 T$ b' m - ---example---2 D3 @9 z; ?1 v- `9 n" ?9 Z2 K
- [DBEXPRESS]% Z4 ` ~7 W4 i: w
- sqldir=mysql_sql% h; d v, M" \: h* H. D; |
- Drivername=mysql
f& b8 c8 Z) q" t$ k - Database=test
% x9 B- ^5 {! m- J4 }! T r - Hostname=127.0.0.1
* @' ]0 L- `7 n0 p, j3 X* q8 I - User_name=testuser! e0 k" Y* S% r' z7 T
- Password=my_password- Z4 i L6 T, _. ]1 |
- GetDriverFunc=getSQLDriverMYSQL) `6 | A& f8 i7 ?! P' u- }$ A, F
- VendorLib=libmysql.dll
$ b8 Q$ L7 j" I& i1 W! Y8 y) l - LibraryName=dbexpmysql.dll
* A5 s$ `+ O' ]: y! ?& J2 E - Active=16 ^/ W& f5 m1 Q3 ?
- ---example----
9 U4 f: Y) d x$ j- b7 [( G - - written 02.03.04 by pwk.linuxfan- H( @: g8 H7 O9 v9 Y5 {( S: @
- ! M* F8 K1 f& m# T4 \
复制代码 |
|