|
|
麻烦翻译一下,下面这段文章:xhan , D+ n7 B' D* ]2 g4 I9 Z
% j( O$ Y' N4 |
- # T0 G# z& Y: @( r% A
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 |9 I2 n& q( G# F
+ p1 k( m6 P! O) l. d! @- ### What we need ###
. t/ g. ~$ r& ?! [ - Naturally, we will need a MySQL server to store the data for us, this document - s+ S2 m2 x; d! Y& i. @
- will not explain how this can be done - there are documents out there for the " a# Q9 b C- ?9 c
- interested. The requirements include a (empty) database for TeamSpeak to use
9 y9 N& Y; L# b0 d( [& F3 w - and a user account (username + password) that has the permissions to do stuff. D, y* Y, p9 v
- with the database. Additionally, you will need a vendor library installed on the
& o( _3 q6 B; U9 a( T, d. Q3 S - local machine, this came with my MySQL install.
2 S6 }" u. o0 K1 X: v4 a; s - These instructions will not tell you how you might transfer your data from the
, G0 \, H ^+ j1 K" O - SQLite database to the MySQL database, we start with a clean and empty MySQL
6 N5 i' l1 K2 S - database.
4 \! U3 i/ v' b. U$ t m! _ - Some users have reported ways to import a SQLite database into MySQL, but at
$ K, @9 j+ \5 J0 C" `/ O* i+ v - the time of writing, there are still too many issues - check the current status
0 |5 Z* \3 M& U/ {: X( f - in the TeamSpeak forums if you are interested./ i4 @* r- j7 P, ^' r4 t4 J4 a
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from" i4 ]' h( D# \* q! G
- Borland was used. This driver can only interface with the client library that 6 l X# |: G& R' D: B. v9 ]4 x
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
& ~3 {7 C. h, o E9 H4 M. O3 E - client library - basically all you have to do is to use a 3.x client library as
# e" T, m( f& O - "VendorLib" and a 4.x database to connect to.
7 e3 U* Z2 l& ^ - If you need more info about dbExpress, you can contact Borland.
" v% m8 L3 S4 z
: U( L! ?0 T" a5 y# G9 {0 V2 g- ### Doing the work ###: U, s/ [! i+ ]$ x
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: G' A* G( Y) M2 _& e - the perquisites right, just open your server.ini file, and add this section at( o' Q& x3 U9 ^) c( \; t
- the end:
, d2 y! ]' u+ ^ - ---cut here---
3 P2 S5 h# W4 |; I - [DBEXPRESS]" `9 t. y) k6 M" f# R4 {
- sqldir=mysql_sql
6 |! M1 k( y& f2 k% G9 C9 c$ i - Drivername=mysql! _9 r N# k ^% d: B! Y8 d/ z
- Database=Your_Database_Name_Here& L$ i+ o% W. {3 v7 D
- Hostname=The_PC_the_MySQL-Server_is_on5 }: s) \" }. o2 h1 m8 i7 e
- User_name=User_name_on_the_MySQL-Server
+ G% u6 M% G: O' i - Password=Password_to_go_with_above_user_name; n% u( R* _! F7 _* e" q* V
- GetDriverFunc=getSQLDriverMYSQL- y+ Y. y; u, l
- VendorLib=path_pointing_at_your_mysql_vendor_lib
, m& K) E# m Z. U% G; V2 X - LibraryName=path_to_libsqlmy_libary( i+ B$ Y! ?% r/ |8 J1 j. ~+ T
- Active=1
/ P$ p% G# C! a6 x; e - ---cut here---
2 x% G8 n3 X3 h5 b5 _7 X& a: W - In my environment (a linux box with a MySQL server running locally) I have:6 u4 g% u& R: ^
- ---example---
- S8 s' E* l; l7 u( _ - [DBEXPRESS], R2 U" n$ s$ T4 g
- sqldir=mysql_sql
& Y$ Q! z( Q$ ? - Drivername=mysql
: r8 w$ H. |5 U4 q+ i3 a4 _: z - Database=test
: @$ |! Y* L! U9 h - Hostname=localhost
4 _* d7 K" o& V$ ~* `" u& I" O. ~% R - User_name=testuser( P6 ^5 a( J( c5 I
- Password=my_password" e' G/ X3 {0 _/ X9 R0 _
- GetDriverFunc=getSQLDriverMYSQL# G0 g8 E8 b- r% C* N9 B
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ G+ r, e$ m4 s$ O0 ~& v - LibraryName=./libsqlmy.so
A5 n8 s/ U* X3 _ - Active=1
! \$ F/ O$ G9 c- v; x" i( [, w - ---example---& B! `, C, @: Z; {. Z7 C
A, h0 ^- u: p# X/ C6 l q. Q- On a windows box, also running the MySQL server locally, it would be:- Y( R' G R' @2 l
- ---example---
, X ~2 }7 C" r7 z - [DBEXPRESS]
0 ?/ B3 M- j5 D1 A2 L& e - sqldir=mysql_sql
4 H: m" q4 w( T. l4 j - Drivername=mysql
' ^1 ?' x' n3 W5 y$ I9 { - Database=test; ^; }/ M! I" D2 L) R/ H# W
- Hostname=127.0.0.1
0 u1 C8 R1 A) G9 T+ l - User_name=testuser5 F1 x& g1 B' w3 i# o. Y7 Y0 c
- Password=my_password2 r0 Z6 {: |+ p
- GetDriverFunc=getSQLDriverMYSQL& X: Z" [5 T5 G0 N2 S4 ?. }: }
- VendorLib=libmysql.dll
) f/ v: ]: S- z. a1 `* k - LibraryName=dbexpmysql.dll) H( f+ m# R/ N8 v# J5 s
- Active=1# S# V6 X4 K$ J0 F4 b) M/ s
- ---example---- E3 U& s4 y `- a
- - written 02.03.04 by pwk.linuxfan* G( p, U. }% }% {7 H, B
- ' t# e+ L7 K. b2 x m2 [( }% ^
复制代码 |
|