|
|
麻烦翻译一下,下面这段文章:xhan ) {) z# ~. g! F) }
* P& t! B J0 r! g-
! ^0 D. Q, \( w* m1 t) j - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ v& d) F4 s8 E' H, m( S
- * e8 l* V! M3 s( k. F: h# U
- ### What we need ###
3 g+ _3 r" }: R P, |- }- @; V - Naturally, we will need a MySQL server to store the data for us, this document $ j3 C& P+ w$ K; J
- will not explain how this can be done - there are documents out there for the & H' Z8 s; G9 u
- interested. The requirements include a (empty) database for TeamSpeak to use
( v: G O2 `3 c* `9 J' F; w* w - and a user account (username + password) that has the permissions to do stuff
- B' i3 T6 K# W# l6 \ T O" X7 v ] - with the database. Additionally, you will need a vendor library installed on the
" _) @ O* e8 v1 t( e - local machine, this came with my MySQL install.
5 E7 x/ j/ L! X# B) @8 | g - These instructions will not tell you how you might transfer your data from the
3 s" A- `6 b* l1 m& z - SQLite database to the MySQL database, we start with a clean and empty MySQL* l# \ b- b0 S& ]
- database.
& Q& w& j- c; [) s: z& ^ {3 Z - Some users have reported ways to import a SQLite database into MySQL, but at
$ {- }) K; N, G+ a - the time of writing, there are still too many issues - check the current status4 _& I9 j4 w! \( C6 a. y
- in the TeamSpeak forums if you are interested.: Q v0 h3 t+ u6 {6 ]# |
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. {2 B/ [8 b2 }& \ _ - Borland was used. This driver can only interface with the client library that
! Y; T# }2 u6 N. `% N - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
J3 ^6 v7 _1 K4 ` - client library - basically all you have to do is to use a 3.x client library as 6 X# K8 h+ V( N* Z; p2 e* v
- "VendorLib" and a 4.x database to connect to.
& P) }" a& C; l$ J% }0 p - If you need more info about dbExpress, you can contact Borland.- [1 P$ n$ H+ `. i6 O. Y
" }9 Z9 v k4 ~- ### Doing the work ###
% [$ F+ y' [) O4 l9 w - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. v0 H* y. [$ {& E4 Y# N - the perquisites right, just open your server.ini file, and add this section at
( Z$ o" X- }; k/ t( V, Y( P H - the end:5 u+ Q2 Y4 G1 h2 P+ h& t
- ---cut here---
$ N" n! N6 x/ T) n& d - [DBEXPRESS]/ F; f% A8 q9 a! c# w% b& S
- sqldir=mysql_sql
* R, X, G& j3 e# w/ o7 v# ` - Drivername=mysql. ?! k* P0 z9 \: e. s; d1 @( j0 R
- Database=Your_Database_Name_Here
6 S: R$ n! ]. C v+ K - Hostname=The_PC_the_MySQL-Server_is_on' ^% F4 G8 p7 _0 K/ e/ p; J; B
- User_name=User_name_on_the_MySQL-Server
' c1 }" [3 ^' K- L% d2 b) H- R - Password=Password_to_go_with_above_user_name
. I7 \; d9 v7 | n0 f3 Y - GetDriverFunc=getSQLDriverMYSQL
3 G+ Z" r/ d7 u - VendorLib=path_pointing_at_your_mysql_vendor_lib r" p* ~( a! G+ U
- LibraryName=path_to_libsqlmy_libary' H% s* `2 G" s# u" F7 b! L6 j
- Active=1( R& \2 z' g$ D3 `0 m1 f6 O
- ---cut here---7 E+ _6 G" \2 H
- In my environment (a linux box with a MySQL server running locally) I have:
L' E( O8 G( ]' M6 W) M( Y3 N2 z; W1 x7 n - ---example---3 X3 Y' y- E) m, L' X
- [DBEXPRESS]6 j9 s9 h. Z7 i8 q0 L1 d
- sqldir=mysql_sql+ W Q+ H* B: d4 j1 Z' ^( i
- Drivername=mysql& Z$ P: d) X$ U$ j6 Q
- Database=test! G% A o9 [5 q& J+ H
- Hostname=localhost2 j* y c3 H6 U0 c+ z$ S, L
- User_name=testuser
; ~- t$ g, w' ?, ^; T - Password=my_password4 M& @2 h7 x% _, W# ~. a9 F7 G
- GetDriverFunc=getSQLDriverMYSQL" ~" _5 } S2 `* b
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
W$ \" S8 L! w; W% g& J0 E - LibraryName=./libsqlmy.so
+ r/ Z; L; Q r% }5 Y) [2 p - Active=1* ~8 u. x" [5 a9 {/ b
- ---example---
# p: M) ^# B1 v& [+ |
K* L+ A5 `5 x% o, g: q, j; L- On a windows box, also running the MySQL server locally, it would be:
3 d" E$ k# K( _ - ---example---* j6 x' \2 M& k# K) e
- [DBEXPRESS]; j9 q+ h+ f# X
- sqldir=mysql_sql6 x. W: ^ \) V$ i
- Drivername=mysql7 [9 }4 t- j; T& D, i
- Database=test
" [0 k2 e$ Z% V7 b1 @ - Hostname=127.0.0.1
7 c; p* e+ ^0 X# N - User_name=testuser8 `, n" |: \! Y1 C) H2 n
- Password=my_password1 f% c( e1 O+ z8 {; T
- GetDriverFunc=getSQLDriverMYSQL1 ?$ ~3 O8 C. ^5 R
- VendorLib=libmysql.dll k# c+ q* M! \ m" Q, v4 r
- LibraryName=dbexpmysql.dll0 Q3 R' Z' ]3 q
- Active=13 s% ], Q- D1 X+ d1 [# V
- ---example----% Q3 l8 T# j- y; |, s
- - written 02.03.04 by pwk.linuxfan
" H2 f, _4 l& \, ?$ l
" Y. b( X6 N y9 z: l3 ?. g) s
复制代码 |
|