|
|
麻烦翻译一下,下面这段文章:xhan % f6 U1 |$ X7 G+ [0 i! a* C2 f: n& q9 }7 C
9 h& G7 _& Q9 ^9 F: F
-
1 ^! Q, A; Y' L6 e2 p- K3 s - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; I/ v% S$ v1 f+ [3 x
6 L3 w2 X8 @ L) e* H- ### What we need ###
8 M# v# P& U1 R6 \ - Naturally, we will need a MySQL server to store the data for us, this document
+ z ?3 x" p9 O9 @- Q - will not explain how this can be done - there are documents out there for the 7 | `( d' M5 y, D& p) D
- interested. The requirements include a (empty) database for TeamSpeak to use
% F) H; k/ c* m3 z3 O; d - and a user account (username + password) that has the permissions to do stuff; J% S6 y8 x% E. y0 B9 G3 X' w
- with the database. Additionally, you will need a vendor library installed on the9 X2 x- w0 S3 j8 {6 s$ I
- local machine, this came with my MySQL install.
* |* {& X' D" T/ G, u7 o' h6 n% t: w - These instructions will not tell you how you might transfer your data from the
' U7 _! }2 \$ i+ _" Y - SQLite database to the MySQL database, we start with a clean and empty MySQL
3 X# I" O5 ^8 {7 E' s1 u& o+ C - database.
' t! P, O5 U" M( Q# y' } - Some users have reported ways to import a SQLite database into MySQL, but at
& p6 I% p2 r) [7 l$ S. Y' B - the time of writing, there are still too many issues - check the current status
- U6 c: p( C( L - in the TeamSpeak forums if you are interested.2 ]3 N/ H+ e) ^
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ }! d" X0 l8 H8 ^0 d. l( F
- Borland was used. This driver can only interface with the client library that
2 m9 E/ m' w5 E1 ~% b - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
) {/ ~( m+ d1 u% Y0 V4 D+ a- T7 G - client library - basically all you have to do is to use a 3.x client library as
4 _6 f0 S* a. P) o4 H6 Q - "VendorLib" and a 4.x database to connect to.
7 ^; L7 C* U) ^7 q& G/ y7 l - If you need more info about dbExpress, you can contact Borland.5 w: }' i$ _! P
- 9 N+ E5 ]$ w7 m9 q. t2 k4 A
- ### Doing the work ###2 O- A7 q/ {1 q' x5 i! J
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: H& b y- @* t# l$ M! @+ @
- the perquisites right, just open your server.ini file, and add this section at
6 J$ j: |4 S3 @( Y# B0 ]0 B - the end:
- U9 ^6 }+ R2 D, B& N+ i# u3 x - ---cut here---
/ ^2 T9 l/ Z5 F4 J - [DBEXPRESS]9 M. [: I* R* [; @
- sqldir=mysql_sql8 j& x' R* [) F/ ^6 n' }+ L( |
- Drivername=mysql9 h, h3 I, [* \" b! n
- Database=Your_Database_Name_Here0 q) J+ R( V$ I5 @5 S5 x
- Hostname=The_PC_the_MySQL-Server_is_on) p- I+ y9 j$ l6 u
- User_name=User_name_on_the_MySQL-Server! @1 E8 Z3 R8 }- v6 Z
- Password=Password_to_go_with_above_user_name
7 R/ D. Q1 ^0 P5 N; y2 E - GetDriverFunc=getSQLDriverMYSQL
: S J0 ^+ e" a* X - VendorLib=path_pointing_at_your_mysql_vendor_lib
* m+ H% L) `5 V - LibraryName=path_to_libsqlmy_libary
. y$ f- z |3 c( A# r8 S - Active=1
" R9 I- M* W8 y& O: l! |% n/ [& q - ---cut here---
3 {2 v9 v5 d& Z; E - In my environment (a linux box with a MySQL server running locally) I have:
7 Y/ M" R7 {9 ]8 o5 s - ---example---
' Z- K/ T' j5 V1 [, L* I - [DBEXPRESS]4 Q5 v+ U! S+ e
- sqldir=mysql_sql4 f5 T) a, X5 Q) N" D$ Y, B7 Z
- Drivername=mysql
1 Z/ c$ N1 c7 N6 L$ b - Database=test
; k3 A% \5 [6 |* G1 i - Hostname=localhost
3 f0 R: e. a9 i0 h% S& T - User_name=testuser! y7 p1 _7 `9 C- u4 W8 p
- Password=my_password& y# ~# o0 e% y0 A$ X1 W; {2 g
- GetDriverFunc=getSQLDriverMYSQL
) p% ?0 O. H' B- P3 Q- z: b' v - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( a2 [; Y' R& ~1 C
- LibraryName=./libsqlmy.so' X! _, u" n, l, T
- Active=1
( [* o' I! C3 S9 | - ---example---
' P- m; K! S. x - % T* C6 T) m$ @( n* p4 W
- On a windows box, also running the MySQL server locally, it would be:+ J6 h# l/ |: N
- ---example---
/ \0 n7 L( r" [9 G2 A. \ - [DBEXPRESS]2 A* ?) @$ l8 g9 N6 e
- sqldir=mysql_sql& E7 N$ a, F( X; Q4 z B
- Drivername=mysql1 J* l0 `+ f. T. Z% i4 k k* @. J' L
- Database=test
# f5 \7 l" c0 k; b3 X2 \7 K - Hostname=127.0.0.1
/ S5 n: R: m H5 E A# i - User_name=testuser8 P) R8 {# ?. W( J% T
- Password=my_password
4 B& `7 z3 n* d2 V - GetDriverFunc=getSQLDriverMYSQL+ D% `. {. y0 `0 F
- VendorLib=libmysql.dll0 w* v- M; _, v5 [: C2 w: i
- LibraryName=dbexpmysql.dll( b1 x. T- |- n% @/ J2 p
- Active=1" V$ X& T7 a, m. ?; ]+ i# y
- ---example----! L. e" ?+ C/ w6 I
- - written 02.03.04 by pwk.linuxfan2 \+ c9 W3 J1 e1 C
- ' d4 O9 c# M! b" K+ D/ c4 D% ~
复制代码 |
|