|
|
麻烦翻译一下,下面这段文章:xhan
. k3 [1 H6 d0 z8 Z' u7 @2 @4 ^( u/ M$ R# P. x _* R$ ~5 M2 j
- 0 Y+ h d( I7 \# u
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
% \/ ]& {+ Q* M9 c7 }
% I9 w# S# E3 e$ o* ]2 y9 a @- ### What we need ###
8 T7 ~0 i7 G2 A& q5 D/ T - Naturally, we will need a MySQL server to store the data for us, this document
3 Y* a* k9 X" u) V: j - will not explain how this can be done - there are documents out there for the
/ a) o4 b& T& |; t( D - interested. The requirements include a (empty) database for TeamSpeak to use+ d0 z: R6 h9 i1 t2 A) F, R- f
- and a user account (username + password) that has the permissions to do stuff
V- y6 i5 h& t; @" ` - with the database. Additionally, you will need a vendor library installed on the, Z4 t2 p9 j& c
- local machine, this came with my MySQL install.
& I/ d1 ~$ i* U1 `6 _9 W$ Z - These instructions will not tell you how you might transfer your data from the- q) [: C) i5 w
- SQLite database to the MySQL database, we start with a clean and empty MySQL! W$ ?: ?0 c1 t
- database.
& X# k6 P& |, ~* P - Some users have reported ways to import a SQLite database into MySQL, but at
4 j( m7 L/ w+ n) M% \9 Z - the time of writing, there are still too many issues - check the current status
# a/ Y' h* ~; B$ J4 e - in the TeamSpeak forums if you are interested.
6 z# X( j' o. e: S6 m - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
1 i+ Q% W5 |9 \) o: Y t - Borland was used. This driver can only interface with the client library that
7 y" w. y ?" A. k7 i4 P- a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this' b" I3 p0 G- u) w( U6 R
- client library - basically all you have to do is to use a 3.x client library as - c: O) \' i( z/ y/ o9 o
- "VendorLib" and a 4.x database to connect to.$ W( f! Q4 q+ Y5 {9 @* S
- If you need more info about dbExpress, you can contact Borland.
S5 I6 I3 X M+ e' f6 ?
8 G" g9 l3 W6 _1 O9 s1 L- ### Doing the work ###
/ t1 [' u* D, s! _; y( w j - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; e! z# H$ W+ _; D
- the perquisites right, just open your server.ini file, and add this section at
: ~/ m3 O0 y8 k% [( o, \ - the end:( b+ y) c3 r5 y- C
- ---cut here---
; B6 J$ A' @7 K; v. u8 _ - [DBEXPRESS]2 C( Y7 s7 N: |- l
- sqldir=mysql_sql
- E6 X- V7 r9 \; Y6 W, \: m. A4 P - Drivername=mysql$ H. \& S T# M2 L8 m' h
- Database=Your_Database_Name_Here8 p4 T+ U" l# F% `
- Hostname=The_PC_the_MySQL-Server_is_on! k. d7 H- r J( b9 k2 a7 O; G. R
- User_name=User_name_on_the_MySQL-Server, I% R0 o: b: S$ F6 @: P
- Password=Password_to_go_with_above_user_name
, S( E7 c6 w3 L* J+ R9 R - GetDriverFunc=getSQLDriverMYSQL
: E9 U# |% o( c, Q! L; w% _ - VendorLib=path_pointing_at_your_mysql_vendor_lib( B- \. l! C- @5 D) J
- LibraryName=path_to_libsqlmy_libary( k/ H( H: |4 o d9 j6 H: L
- Active=1# e+ l/ C0 M4 @, I
- ---cut here---% }' E& Y& x- c! r( `
- In my environment (a linux box with a MySQL server running locally) I have:
! `2 t4 M$ X9 f% k4 z - ---example---# g& G, R, x3 P1 j: j0 a
- [DBEXPRESS]; K2 d1 W% @, S3 u7 g
- sqldir=mysql_sql
* |/ d6 T" ?* R7 B/ i- n9 P$ J - Drivername=mysql! D B( n' c. U( l" ?9 B5 J$ q6 {! ]
- Database=test
: \( w: N3 h5 O5 w! G5 N - Hostname=localhost
: A1 g) J* h: e/ D6 v3 ]5 F+ m& K - User_name=testuser
+ P+ X7 ]" Z8 X/ e - Password=my_password
" ]; }- X! W! P5 l- }( K7 ?# h; V/ ~ - GetDriverFunc=getSQLDriverMYSQL
0 H: b9 E3 X* R - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. \3 i3 D1 p: R# {- D7 s) {0 z
- LibraryName=./libsqlmy.so
: \5 [+ v. \6 U# t2 k: _ - Active=1 y/ g3 L6 w0 x5 ^$ X3 A
- ---example---
" F; S& G t' k1 A; Q: {
, P2 x. j: k8 \& q \' f0 X- On a windows box, also running the MySQL server locally, it would be:
5 ]( l7 \: z* V# A! _- a; d - ---example---
5 Y' l: q+ |0 `* N2 e! s - [DBEXPRESS]: ^7 g% v* M# h: v1 c* X$ k8 J
- sqldir=mysql_sql
, E5 m* ]' i& l2 J* u2 e - Drivername=mysql
1 m1 T/ _. r; N# W1 E4 d - Database=test' \; J5 |, V2 o5 G4 n$ m' v R
- Hostname=127.0.0.1% ~2 T0 ~, K. k8 n! _: U" i* ]' [
- User_name=testuser
0 a y' s8 `6 O- n: Q6 N. v' {0 Z - Password=my_password
% D7 G% H" E; N# I( o9 O - GetDriverFunc=getSQLDriverMYSQL& d0 `; C8 T2 R% x' o0 d0 ]
- VendorLib=libmysql.dll$ N+ \1 t) g6 n
- LibraryName=dbexpmysql.dll
2 ^' n& y$ w! E9 J0 p - Active=1
5 S6 W) I, [0 e! T" V - ---example----
) ] N7 V9 n4 M; T; {0 |! r - - written 02.03.04 by pwk.linuxfan
% z; l3 U! f* `! K7 _8 e( a7 X - / t3 e: }; [! h" C8 V
复制代码 |
|