|
|
麻烦翻译一下,下面这段文章:xhan # J9 F0 L! q0 @3 m. O) |# _
; H2 l7 W x0 b; M6 m; I2 r
-
5 `& R+ {- Z. ?& R g9 G# h0 W - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ ^" K- k+ M @6 s3 t5 l
- ) p: ^- i. m9 r0 ?3 J
- ### What we need ###* e0 |) _6 E/ y3 U" A% F: w: i5 {. b4 G
- Naturally, we will need a MySQL server to store the data for us, this document 4 A8 F) i" G5 i- }7 b' |1 K& O2 P
- will not explain how this can be done - there are documents out there for the ' ^# u; i: `9 \ a0 p8 {
- interested. The requirements include a (empty) database for TeamSpeak to use' V1 U" d! H, d! B5 H
- and a user account (username + password) that has the permissions to do stuff
* ]# |# b: Y2 V - with the database. Additionally, you will need a vendor library installed on the7 j4 ?5 I* i+ ?0 K' Y/ I: u
- local machine, this came with my MySQL install.6 W0 N# S' b% z
- These instructions will not tell you how you might transfer your data from the% c0 z u: P0 Q' m5 s. E2 s- U
- SQLite database to the MySQL database, we start with a clean and empty MySQL
* v6 X) [* ^4 j9 C - database." A" M* _0 y! | n
- Some users have reported ways to import a SQLite database into MySQL, but at
; E4 c2 b+ d+ U - the time of writing, there are still too many issues - check the current status
, K M) a3 @" W, n3 { - in the TeamSpeak forums if you are interested.% G: [' G/ l, h$ G# m2 z6 u
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 U8 R! W7 C9 \2 j3 }6 \% a) h" \ F - Borland was used. This driver can only interface with the client library that
1 V- ]) z3 O7 I1 J7 H - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 p1 r) D: v; N) ]& A0 {+ D - client library - basically all you have to do is to use a 3.x client library as
# B# j! P2 ]9 f8 _) ^4 R3 j) i - "VendorLib" and a 4.x database to connect to.
2 |4 a9 e6 A& @! p% I! j9 u - If you need more info about dbExpress, you can contact Borland.
: q- L2 w- f7 U6 |) {- g0 F/ C, q - - y% k; X, `+ j+ g6 i) W
- ### Doing the work ###
. s! f% u. L, h6 d w - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, ~* l6 s* Y/ i: L - the perquisites right, just open your server.ini file, and add this section at
/ e7 `' }2 A; N8 p8 ?& \ - the end:: Y! x. r3 q' |! p- L
- ---cut here---
2 w$ N+ h+ @4 Q' d - [DBEXPRESS]
3 U- ^% a' R/ v$ }) k/ H - sqldir=mysql_sql
' M! l( [& t% C& r& z. T - Drivername=mysql
/ n; f( t/ J4 o8 }. j0 t - Database=Your_Database_Name_Here# A* b' ~/ C: P2 I) d3 C2 C
- Hostname=The_PC_the_MySQL-Server_is_on( y# y3 N* g5 X( S" y8 T/ G
- User_name=User_name_on_the_MySQL-Server
, e$ Z) W: S0 V8 n7 o/ d) o - Password=Password_to_go_with_above_user_name) R+ X D1 {. L1 h# ?
- GetDriverFunc=getSQLDriverMYSQL( v, O0 `. j% F) L
- VendorLib=path_pointing_at_your_mysql_vendor_lib
Y6 T; N! S' v$ j3 \- M; A - LibraryName=path_to_libsqlmy_libary
- w$ R! a% [& J$ k - Active=1
& a; a% l& H6 D- N) g$ G - ---cut here---% B1 I0 R) k; ]# v0 C6 T/ G
- In my environment (a linux box with a MySQL server running locally) I have:, N) l& t. m6 \; E" J
- ---example---
+ e! B5 l6 W* u+ o/ { - [DBEXPRESS]3 |6 D" H4 I( A; R, l
- sqldir=mysql_sql4 ?( d$ f% A0 [, `* l
- Drivername=mysql: s0 ^9 q1 X; v
- Database=test7 S1 B, W/ ~0 o" J
- Hostname=localhost
. A4 x [' T$ a/ H% ]7 b) K3 T; @ - User_name=testuser% `, ]/ q7 g0 `2 D" U6 l2 L
- Password=my_password
9 u7 a. l" C: e( w/ [ - GetDriverFunc=getSQLDriverMYSQL
8 m5 W' q9 b, z; Q; d - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( T. G7 {! \' { P+ ~) O - LibraryName=./libsqlmy.so7 v& {7 @4 @; ^; `8 S3 i; |
- Active=1, c: F$ j; s( u; M; ~2 B; p8 |0 y
- ---example---- L. W$ f( O9 z1 s4 L
5 {9 t" w0 y% |$ r+ N. ]3 {- On a windows box, also running the MySQL server locally, it would be:( Q7 D. x( h J( U/ @. j
- ---example---* p1 n% v' M1 f0 B
- [DBEXPRESS]7 d1 p* G, J6 h- b8 f' T
- sqldir=mysql_sql* K# [3 @4 n8 X8 s: T2 D" Z
- Drivername=mysql
4 C x* L9 y, H9 d - Database=test& Y2 ?/ `7 c. B% R
- Hostname=127.0.0.1
; Z) w2 B2 x9 F, W0 ^( |3 A4 S% A - User_name=testuser
% M( P( Z6 [1 p: j& q8 d - Password=my_password4 \) P: g, ~0 {1 s9 n, q
- GetDriverFunc=getSQLDriverMYSQL
5 q! n- }2 U2 W - VendorLib=libmysql.dll* Q2 {. K! P6 o% ~1 Z6 u: x; d, u8 r
- LibraryName=dbexpmysql.dll
% O& [8 [; x* J" l! V - Active=1
& B- s9 e S5 }' |7 c - ---example----
2 ~( `7 E4 u4 R: c - - written 02.03.04 by pwk.linuxfan1 F0 b4 ?# R* V3 P
4 l4 [2 c3 M- R! Q7 I1 |0 {" U$ i
复制代码 |
|