|
|
麻烦翻译一下,下面这段文章:xhan ! g/ g! S( U- a$ M
) `: H J. q- }& O, K7 v( ]3 J
- ' p# x0 J+ w! c8 I
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
$ k9 {! ~5 E0 w+ W - 2 g" `$ K2 D" W0 ]% g$ N; A& Z
- ### What we need ###
7 x. O8 }7 B: s7 |2 P. B' C - Naturally, we will need a MySQL server to store the data for us, this document 3 f$ s$ I4 B/ _! u
- will not explain how this can be done - there are documents out there for the
" r$ P" a) B2 k3 P) y1 Z2 d) _ - interested. The requirements include a (empty) database for TeamSpeak to use
$ E6 |0 ^4 H1 ~ n- Z - and a user account (username + password) that has the permissions to do stuff
; a( u) [/ E) f g. g# Q( l - with the database. Additionally, you will need a vendor library installed on the
0 Z3 E9 Q8 v2 D+ ]0 f1 J$ a; l - local machine, this came with my MySQL install.
0 P) n! W! }; {9 m* R* x* a - These instructions will not tell you how you might transfer your data from the
( E( E( G9 H! K- q2 l! D& g - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 N+ d8 y! u) c. k% V5 k - database.
! ]8 \# t1 D2 b7 p - Some users have reported ways to import a SQLite database into MySQL, but at
& L5 P1 f& l( w, e0 j7 F( F - the time of writing, there are still too many issues - check the current status( w. R& J/ y- S2 ?8 _
- in the TeamSpeak forums if you are interested.& _6 H2 L" ~% F8 W! Y ^
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) l3 D) w9 s: R+ I' u/ l
- Borland was used. This driver can only interface with the client library that ) k4 |8 E W! o5 D( q+ x1 m
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" S3 F8 ~) }2 A3 K
- client library - basically all you have to do is to use a 3.x client library as
+ |8 a' W) c% q" t - "VendorLib" and a 4.x database to connect to.6 `1 ~, ^, Y, a
- If you need more info about dbExpress, you can contact Borland.2 P3 ?, y# H1 k5 b7 ]
/ e9 [3 m5 v( g+ }- P3 \- ### Doing the work ###
) ~6 o7 |5 s3 j+ m5 U; x$ g - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all% \0 Y/ ?& X+ P! Q0 f
- the perquisites right, just open your server.ini file, and add this section at
4 w$ r8 }, j" u# k' U - the end:% A: x! `: ^- |& _4 @
- ---cut here---
2 \ k0 c" U* ~5 y1 E - [DBEXPRESS]7 g% B( C5 C0 ?9 t: m
- sqldir=mysql_sql, K1 Z7 f7 N6 S+ A
- Drivername=mysql
7 Y9 |8 {) i/ {/ ]- X: z3 m - Database=Your_Database_Name_Here9 r5 |" ]7 |0 w$ Z- w9 x7 ]
- Hostname=The_PC_the_MySQL-Server_is_on
# u. C4 j+ G" r; _9 p - User_name=User_name_on_the_MySQL-Server
+ V1 ^# J6 i" G9 m - Password=Password_to_go_with_above_user_name8 z$ b: h, K* e) Z% R7 N5 T
- GetDriverFunc=getSQLDriverMYSQL
% R( G- U- e9 ?2 Z# | - VendorLib=path_pointing_at_your_mysql_vendor_lib
9 p) O! H1 y, I2 t/ B% }" d - LibraryName=path_to_libsqlmy_libary
0 Q+ r( T( w! \ - Active=1* C+ e* q7 x& L8 `+ f
- ---cut here---; t( Q" z. ?$ F+ @: F
- In my environment (a linux box with a MySQL server running locally) I have:
. ]' Q* D+ h) B( X - ---example---0 _7 n. {" ? B9 I0 P& n
- [DBEXPRESS]
! w1 h% ?( t3 y, E - sqldir=mysql_sql; `: X8 e% l* f
- Drivername=mysql
( Q3 G3 a7 H$ H - Database=test
- _, l7 ^6 i, G0 X' s# w( b - Hostname=localhost
9 N+ |; V( D: r) f8 W4 t - User_name=testuser8 O! o, w( h+ Z/ S0 c
- Password=my_password
% p6 v! k* \# U/ Z0 { - GetDriverFunc=getSQLDriverMYSQL
) w1 T3 u D/ W6 @" z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ A6 H2 ]- \6 |# [8 @" ?3 x+ ^ - LibraryName=./libsqlmy.so
3 B+ D- u) z7 q$ { - Active=10 k$ r O! P h/ ~$ L" i4 S- e& d
- ---example---+ Q6 s% N& i( c3 N+ I
- # E; S3 h- x( ]/ Q S1 R
- On a windows box, also running the MySQL server locally, it would be:, ?% ^2 S- W# s- e2 w6 P
- ---example---
& g( X% f- ]( }6 b( b7 D- h6 R - [DBEXPRESS]
; r. z! {% n: ^3 {4 ?4 ] - sqldir=mysql_sql
) a" o$ o8 N: r/ ^8 ` - Drivername=mysql
: R0 k5 X6 f8 _! V - Database=test
( z* @& J$ e0 ^. B* M/ o8 W - Hostname=127.0.0.1
/ z5 o& K. j! z1 D+ E - User_name=testuser" y K- i5 J( F: ] P4 k7 H
- Password=my_password) z/ H/ Q# ]. c4 F2 k( |
- GetDriverFunc=getSQLDriverMYSQL
" Q4 U7 Q+ L1 ]% L& m+ w9 O - VendorLib=libmysql.dll" `- q$ ]: [( y7 b) k/ f
- LibraryName=dbexpmysql.dll
; Q c0 p3 n3 P' F, k1 R x/ h - Active=1
6 d# T6 j/ w- z1 y9 k - ---example----
% y, }5 P, W3 m) o, r. x: } - - written 02.03.04 by pwk.linuxfan
2 r0 d) f4 ] z3 H3 T) K
. p. ~8 I1 D$ M, l+ n
复制代码 |
|