|
|
麻烦翻译一下,下面这段文章:xhan " H/ l! J# p3 _/ G! ?
- E; b# n( Z& r& N) U/ S; P
-
2 ?9 D: E3 g5 }+ X/ R; Z, h7 y - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 V) g: p; r+ f2 E; w) D
- 3 Y9 K2 d3 ?7 ]7 x9 A1 n0 c8 x
- ### What we need ###
* s. l& {4 T6 d' y - Naturally, we will need a MySQL server to store the data for us, this document
& l; i; Z0 ~9 D: X) Q - will not explain how this can be done - there are documents out there for the
* A* R4 v6 {9 E4 H/ a& \" U2 V7 `1 T - interested. The requirements include a (empty) database for TeamSpeak to use2 ~& g! g# P! O: [8 A& l* x2 @
- and a user account (username + password) that has the permissions to do stuff
. x! R, O1 _% W( U( J8 y K! V - with the database. Additionally, you will need a vendor library installed on the
5 F; u. Z. _* R/ q [% N - local machine, this came with my MySQL install.
6 R! x4 P+ r( C$ a) h, m - These instructions will not tell you how you might transfer your data from the
$ B( `# f* K0 i4 | - SQLite database to the MySQL database, we start with a clean and empty MySQL
& Z+ A6 {1 M, D0 d- p) T7 O - database.
4 L$ E( E$ N: _( R/ b* n$ r - Some users have reported ways to import a SQLite database into MySQL, but at- A# K: h' w; }) a
- the time of writing, there are still too many issues - check the current status0 @ P! ?! g4 a6 c
- in the TeamSpeak forums if you are interested.: Q3 N6 O+ d* u0 K
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ a( j: z+ j; P - Borland was used. This driver can only interface with the client library that & ?' A' I X9 g; }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ s- q! T& l% k% g2 s+ R( \
- client library - basically all you have to do is to use a 3.x client library as " ^4 m9 Q+ ~4 D& c3 ` r0 r
- "VendorLib" and a 4.x database to connect to.2 N( [. g' f8 f9 o
- If you need more info about dbExpress, you can contact Borland.! x9 Z7 E9 _" Z7 O
- 2 i- E3 _' {2 l, y7 b; q
- ### Doing the work ###
$ H* r" {, W! H, j( l - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# ]5 {3 c' D% S% \: p4 y - the perquisites right, just open your server.ini file, and add this section at
/ y8 i' l% U; p1 |- n1 b4 Z6 z - the end:- s& i" \3 ~. |+ E6 O
- ---cut here---
% X6 s- }( j' f; Z5 B - [DBEXPRESS]
9 o" L V; Q! V1 b - sqldir=mysql_sql
/ v6 d" D7 i: | n* C - Drivername=mysql
! k! x& f$ M) v8 U - Database=Your_Database_Name_Here
+ L3 z/ y& h6 k! v9 G+ k9 o - Hostname=The_PC_the_MySQL-Server_is_on% p1 a& v4 P8 l' d& z' {
- User_name=User_name_on_the_MySQL-Server
) n1 a( @% W; n& g- D3 b - Password=Password_to_go_with_above_user_name
0 t% ?! `" D/ L! l0 j - GetDriverFunc=getSQLDriverMYSQL( W5 [% m+ w: I% r
- VendorLib=path_pointing_at_your_mysql_vendor_lib# v9 v- L! S8 R" A
- LibraryName=path_to_libsqlmy_libary0 U- @: e2 Y0 g E$ ^; K1 a# P
- Active=1& L* K! m3 L$ h
- ---cut here---
! x3 Y& f' k* l; {0 u* ]. v. y0 v - In my environment (a linux box with a MySQL server running locally) I have:# Q3 M" Y" [+ M; f) k+ E
- ---example---
. ?# ^) N4 `8 }' w - [DBEXPRESS]- Z( O' A4 m* _& \/ ~! T9 D
- sqldir=mysql_sql- g4 I& n, p" t, a6 t1 k* b8 u
- Drivername=mysql; o( H: _9 Q# _# {
- Database=test
6 B" F4 l" K; S, x9 c: I+ U - Hostname=localhost, V' J* ^2 y6 k
- User_name=testuser
; p" n6 r" h7 q% i - Password=my_password
- z3 X6 `/ q6 |. G - GetDriverFunc=getSQLDriverMYSQL
& ?/ M( S: J% F7 u& r - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
6 ^ j: X( B1 r2 w& j; e8 V6 z - LibraryName=./libsqlmy.so
5 n' D- Y8 A% M9 \2 ^ - Active=1
; `5 h2 W( z. X* A7 O4 |- c - ---example---
2 ~; M6 y9 [5 Q! b9 [ - ( Q4 [% r0 ~0 Z. n5 M
- On a windows box, also running the MySQL server locally, it would be:, u4 k6 j2 x# F/ b9 W; A4 d9 R. u
- ---example---' y1 E" m+ p' z; `" p9 @; M
- [DBEXPRESS]
5 ?* [) H6 Y: M - sqldir=mysql_sql
7 Q, h6 H4 X, u k4 y: F0 K - Drivername=mysql* [* P7 J/ Q6 u1 M
- Database=test
6 X0 d, z" j: ?2 e& v, c# @ - Hostname=127.0.0.1
8 P9 i$ y ]5 H% d - User_name=testuser# P) @2 S3 ?+ a
- Password=my_password$ l+ ~- d# L$ |* G. K. @
- GetDriverFunc=getSQLDriverMYSQL1 {6 [5 [4 U4 X, t6 i
- VendorLib=libmysql.dll
e+ ^8 k9 l7 O4 y- z - LibraryName=dbexpmysql.dll
3 |1 {6 \' J3 C2 L - Active=1
8 m( j5 I! e! V: L - ---example----0 b, f T+ j: e9 J( p! B) \
- - written 02.03.04 by pwk.linuxfan- _& v+ `+ v' q: _- s' q# M. m
3 I' t3 a9 g W) H
复制代码 |
|