|
|
麻烦翻译一下,下面这段文章:xhan 7 u, ?% v7 R9 `8 M3 n* n/ l% I' m
& L7 v& ^$ _ w5 y& ^
- # d! l- l$ f: O; @. k5 K5 D* _% D
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 t7 [1 l$ D- @: o - 6 W, w2 E' H$ ?2 ] v5 V. y2 B
- ### What we need ###
( G1 z4 r* B) m. o3 b - Naturally, we will need a MySQL server to store the data for us, this document - j; F. v( U6 w9 ?7 P0 K& ~4 d! A- D) E
- will not explain how this can be done - there are documents out there for the
* ?% Z& b' B% e/ k/ N6 G j - interested. The requirements include a (empty) database for TeamSpeak to use
v) r6 X: `- }$ V! ? - and a user account (username + password) that has the permissions to do stuff1 Y1 j2 |$ @" X) J
- with the database. Additionally, you will need a vendor library installed on the; K% Z& w; n' R' ?4 \
- local machine, this came with my MySQL install.# W2 {# B% O( J8 w# T, C3 B
- These instructions will not tell you how you might transfer your data from the5 }( N% U3 u5 l. }
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. [1 M! M/ x, x$ C6 o - database.
% X3 }* `6 Z7 e7 j) b - Some users have reported ways to import a SQLite database into MySQL, but at. M0 `4 X6 k* p' ^0 w- ?
- the time of writing, there are still too many issues - check the current status# C8 [+ w( b( r- L. C' L9 ^/ Z
- in the TeamSpeak forums if you are interested.7 B8 } S& U. g! ^9 t+ z) X0 h1 m5 d
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- C* s0 W+ ^/ l8 \ - Borland was used. This driver can only interface with the client library that 9 x, H" M8 e4 ^1 g( B2 z
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 T% o# `6 D* i0 Y9 x2 ]5 d. ]
- client library - basically all you have to do is to use a 3.x client library as
3 U1 K' Q M' d/ \& p - "VendorLib" and a 4.x database to connect to.
; H" b/ @' T5 O7 j - If you need more info about dbExpress, you can contact Borland.& n) d0 e/ L8 ]
- 2 A4 [ g8 h; v) `7 e
- ### Doing the work ###/ d4 |1 ?! m) i
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
T2 I1 d! n% T4 V& i - the perquisites right, just open your server.ini file, and add this section at- i7 Q( a4 g. d! g' v& C( c
- the end:( G" X" I+ R D7 P7 l8 P
- ---cut here---3 d3 |8 o* S% g0 P; }
- [DBEXPRESS]
& T/ `0 M1 @0 e - sqldir=mysql_sql
- U* v( p, J% `) W - Drivername=mysql
. ]/ ^8 D) |, j - Database=Your_Database_Name_Here4 M* w$ A- r. k! ^# r2 v- t
- Hostname=The_PC_the_MySQL-Server_is_on
L% d( q3 n* p# U. G8 ^ - User_name=User_name_on_the_MySQL-Server
" `7 C4 f: }6 w) O3 E - Password=Password_to_go_with_above_user_name
) i* H6 S: j9 L1 v, R! n - GetDriverFunc=getSQLDriverMYSQL/ G4 Y" ]2 O# D9 [+ A& C& F' u
- VendorLib=path_pointing_at_your_mysql_vendor_lib
: c' _7 N5 ?2 h2 M - LibraryName=path_to_libsqlmy_libary
$ Y9 R1 \4 g- j8 f5 t/ y; G - Active=1
: A9 G* m4 ]& [+ P& \ - ---cut here---
, j. K* C3 T' I - In my environment (a linux box with a MySQL server running locally) I have:' c' A, T" U/ p/ U
- ---example---
% Y/ p- T/ j) V - [DBEXPRESS]& B% y$ s/ Y! ?6 z- O5 X- h( |- [/ j
- sqldir=mysql_sql
6 d; u# J8 j9 h - Drivername=mysql8 ~$ R8 }4 P& i
- Database=test. G% }3 K. M/ C( Q* {2 J
- Hostname=localhost
5 S, J. O- R h" G; J: V% u - User_name=testuser% k7 d9 @% S6 U: R- ^7 z
- Password=my_password5 `# @$ E' T, f$ O' h8 e$ V/ U: f, U
- GetDriverFunc=getSQLDriverMYSQL1 I. e2 g: r& C+ X2 v
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% O4 ^6 c6 D' m! _
- LibraryName=./libsqlmy.so
0 ^9 E. W; j. q8 K: O1 V+ |; Y# a# { - Active=1
$ d9 O# L* m* r- Z! W- @7 z1 k - ---example---+ Z+ I0 z( h+ `& Y. p2 m) S' f8 Z4 v2 V* ~
1 Z) v9 Q& w5 H$ X0 H7 d* b- On a windows box, also running the MySQL server locally, it would be:! N) B* w4 k* y. m* Z$ @
- ---example---- W8 x- ^0 M3 q$ w9 L! X$ X1 d
- [DBEXPRESS]
' Y3 \- j7 S1 d0 {* H - sqldir=mysql_sql% |0 c0 X k U: @
- Drivername=mysql6 c0 z8 p* c9 y& R
- Database=test d, g$ `# R% R8 ?! j: c
- Hostname=127.0.0.1
: ?3 [. ?$ {6 z( m - User_name=testuser
$ z& I0 [, w0 u1 K* z' f! j1 c% f, i - Password=my_password: x$ h0 Y d, ^
- GetDriverFunc=getSQLDriverMYSQL
@) k5 a7 S& w) Q - VendorLib=libmysql.dll
" p' a0 @& Z! y9 M" ? - LibraryName=dbexpmysql.dll3 e& P' t4 t @+ s! X! h+ D- G
- Active=1; C4 H+ X5 O# `6 [- a
- ---example----7 k) t w$ F2 Y1 e: _4 a
- - written 02.03.04 by pwk.linuxfan: b+ l& ]& p9 Y! y* U6 S
- + l" q( K! d7 y: m5 l, g- r
复制代码 |
|