|
|
麻烦翻译一下,下面这段文章:xhan ; C7 d0 Z1 U7 ^
$ G: T& I6 S# }! K( J-
' `, I8 y0 H. x - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ d8 B3 W& }, @: \* j7 ` V
- c p5 h" X6 |, H$ W N" @- ### What we need ###
3 d3 ?5 d' Q4 P8 U' e2 U9 z - Naturally, we will need a MySQL server to store the data for us, this document
8 Y$ F1 w( u; P: @* g( B5 k- A - will not explain how this can be done - there are documents out there for the 9 A8 @+ j( x! I
- interested. The requirements include a (empty) database for TeamSpeak to use+ {" k/ m2 ^1 I) a
- and a user account (username + password) that has the permissions to do stuff! Z0 b" A4 b, d: ?" T
- with the database. Additionally, you will need a vendor library installed on the" L, N9 v" q, s8 q6 i3 b6 S
- local machine, this came with my MySQL install.- o) ^- \- t k; g. v
- These instructions will not tell you how you might transfer your data from the
& l: Q! [2 H, q7 a3 a - SQLite database to the MySQL database, we start with a clean and empty MySQL
! ?8 F1 w, z' L9 ?. S& k f - database.
7 k: Q9 U3 V! A) I5 G - Some users have reported ways to import a SQLite database into MySQL, but at
6 [9 Y, V2 u, I( G e7 J+ c - the time of writing, there are still too many issues - check the current status
+ p8 c, k) {# I3 y5 }/ p - in the TeamSpeak forums if you are interested.
; O" {$ @' e, h5 P7 E - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 m' z* [" G- p" n$ @/ T
- Borland was used. This driver can only interface with the client library that
( Y4 W" c @$ j& u' } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" L. \( w6 q7 T6 j/ a, S5 e* V9 R
- client library - basically all you have to do is to use a 3.x client library as
' x- z+ ^8 i4 d; b - "VendorLib" and a 4.x database to connect to.. E3 q' _& N2 j: b9 e+ ~/ q( m* i& Q
- If you need more info about dbExpress, you can contact Borland.
( ^+ }% @& { T% r! Z
8 a1 K9 e1 y, N. \0 p; G- ### Doing the work ###( q- r4 g, ?2 J2 v
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all! \6 Y* Q# n) w% j2 u1 J) p
- the perquisites right, just open your server.ini file, and add this section at/ m3 G2 O2 G: S6 s1 N5 K+ R5 L' r2 j
- the end:
( L4 G; ]+ @1 J. s3 k; G - ---cut here---1 I; m T$ X( u; H9 ~3 ?
- [DBEXPRESS]! G+ _ \" m# i1 H D& Y5 Y
- sqldir=mysql_sql+ l3 T6 r( V5 f' L
- Drivername=mysql9 a; l; B3 A( F. v
- Database=Your_Database_Name_Here- L2 m! a; `+ p2 Y$ O) I2 I
- Hostname=The_PC_the_MySQL-Server_is_on
" Q8 o; h" N9 m! q( R# i - User_name=User_name_on_the_MySQL-Server
& m! l' ?; H C6 | - Password=Password_to_go_with_above_user_name& ]; d# N$ [, i& w! R
- GetDriverFunc=getSQLDriverMYSQL
: M- s/ f. s5 o, f. Q" f, A/ N3 K - VendorLib=path_pointing_at_your_mysql_vendor_lib
9 q: t9 i' p0 i+ r - LibraryName=path_to_libsqlmy_libary: i& q& w* @) F" `$ X1 e
- Active=1
) S. W) a# ?1 l" ] - ---cut here---1 }! w0 z" n0 P- w& ]* \' t
- In my environment (a linux box with a MySQL server running locally) I have:
$ x) O3 ?/ f; Z3 n9 \ - ---example---, l- J; G. a+ a/ J7 P2 D
- [DBEXPRESS]& D! H) | I/ e6 p, p) V
- sqldir=mysql_sql
4 ~+ W! V. m! k0 f5 Y - Drivername=mysql: t. y' U% Z- z5 X
- Database=test* d' W3 F V) B, U+ K3 e) j2 B
- Hostname=localhost
1 X9 w* W& d5 H! O; F - User_name=testuser
9 I) A9 q0 q3 D$ _/ Q2 F/ l' f4 |1 Z" L - Password=my_password0 h+ ?3 }& L9 X2 T0 y1 p" {; n
- GetDriverFunc=getSQLDriverMYSQL$ f1 n! @0 s7 K! `1 ~9 z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0: A' r* ?3 n- Y$ G8 n$ Z" r
- LibraryName=./libsqlmy.so1 X% T1 l- ^1 `' P! {7 k8 W2 A
- Active=1- C. m3 m" m" `4 y/ C# V
- ---example---
0 x9 d4 `" I' K9 c9 N( k
" S. V8 O& e9 c5 I0 a% M- On a windows box, also running the MySQL server locally, it would be:
5 H# o# A5 I& n8 { - ---example---
! `% w; k( w ~. U* ~- R1 A - [DBEXPRESS]
+ p$ T# k3 b0 ^ - sqldir=mysql_sql
0 c' F( [4 ^. @9 c( B7 ]4 f+ L/ |1 d - Drivername=mysql5 l4 j' @! f* F; n+ @
- Database=test
2 o( m" Z% o, q7 f+ Y8 ]2 V - Hostname=127.0.0.1) w! [( y7 \; x* p0 g8 j
- User_name=testuser5 P/ z" P" e! x$ h5 n
- Password=my_password& G7 K4 K0 I' G
- GetDriverFunc=getSQLDriverMYSQL# x5 Y: N+ Z; \ m) V8 B _
- VendorLib=libmysql.dll
( |- |6 r# ^9 p; e - LibraryName=dbexpmysql.dll
4 R+ F' ?" Z# m, P! m - Active=1, R6 T) H6 |% m& a' b1 {
- ---example----3 v$ i. `! g; O6 l4 U* x) b
- - written 02.03.04 by pwk.linuxfan- e; `% R" e w& |( ^) t: y! @
- - s j* D6 \: ~6 M5 d2 y9 I
复制代码 |
|