|
|
麻烦翻译一下,下面这段文章:xhan
* }! T/ {& S M- G3 V9 b
4 J- O+ I: z! |; C- ) {+ s1 ^# x7 G3 w$ `
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ \6 m- V" ~& m. {$ Y+ v# m - 6 o6 p/ @9 K* w N
- ### What we need ###
( B* Z0 v; [. w - Naturally, we will need a MySQL server to store the data for us, this document * R& \9 @/ O/ _+ z7 C, B
- will not explain how this can be done - there are documents out there for the
- z6 e: Y8 g2 r - interested. The requirements include a (empty) database for TeamSpeak to use! t/ U, t+ x( e0 i% w$ }2 u( H
- and a user account (username + password) that has the permissions to do stuff% |/ q( ]* \' U( h3 [) h
- with the database. Additionally, you will need a vendor library installed on the, R. [4 S7 Z" d: t
- local machine, this came with my MySQL install.
9 y( p! ~9 h2 G4 S# Z2 }% f' @. Z - These instructions will not tell you how you might transfer your data from the
4 [; h4 ?% Z" H* C$ y - SQLite database to the MySQL database, we start with a clean and empty MySQL8 y: e1 k3 V+ P$ {+ D& m
- database.1 G+ j& v. @4 Q* Q" s, ~
- Some users have reported ways to import a SQLite database into MySQL, but at
- _5 y/ M# ?$ k) h& B - the time of writing, there are still too many issues - check the current status
7 f; d% ?' G$ b0 U; }* y - in the TeamSpeak forums if you are interested.
( ?! y7 k* v6 c1 C& v - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from4 }' z6 ]" M8 Q0 a7 @
- Borland was used. This driver can only interface with the client library that ) N6 j) o; [0 }" G+ B" }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# x& X' V6 Z; v+ W0 d& _# r - client library - basically all you have to do is to use a 3.x client library as * R% O0 m0 ~; ?$ n! q
- "VendorLib" and a 4.x database to connect to.1 s* @+ y% g/ s$ j- J& c+ p) w
- If you need more info about dbExpress, you can contact Borland.
4 l: ]$ w# T/ S) ]+ b, Y* ?1 X/ |" c- ]* d - ( ~1 H6 M0 }& }9 u0 F2 r3 y5 x0 b
- ### Doing the work ###
* w$ ?. O4 D: c5 N2 R- | - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all1 @+ f( x* g3 r' f( c- H+ }, N2 x
- the perquisites right, just open your server.ini file, and add this section at
`, U. p3 P8 J) w! k - the end:
. W$ R- d6 K0 A' F# H - ---cut here---% [+ ?' t& T* K. F* X% H) z5 {
- [DBEXPRESS]& Q9 e+ ^# L" |. I4 l( A
- sqldir=mysql_sql+ P9 q4 y- A+ ]+ L P% ?4 X' a0 k
- Drivername=mysql
% k% R' A9 c; \- m4 { - Database=Your_Database_Name_Here" ?0 n9 m8 f: [5 `& _
- Hostname=The_PC_the_MySQL-Server_is_on
# y7 h6 S$ c7 `2 g$ b0 i6 L4 `0 C - User_name=User_name_on_the_MySQL-Server
6 ^3 ^3 m% e, t' m% n, d$ v - Password=Password_to_go_with_above_user_name( B* V: H' G( X t2 p3 c
- GetDriverFunc=getSQLDriverMYSQL* Z+ `7 j- ]6 K$ \0 T6 R3 [' }
- VendorLib=path_pointing_at_your_mysql_vendor_lib: X h2 \7 F; ?, C' c4 R0 ^0 k# k
- LibraryName=path_to_libsqlmy_libary/ `0 j! z' R1 Q% s9 m! n9 M% W
- Active=1+ A1 b8 e) C" u* |
- ---cut here---
! j9 h9 r* P! a; C q% P8 c - In my environment (a linux box with a MySQL server running locally) I have:+ }& c/ b5 Z7 Y! k8 n
- ---example---& F. N. ~5 o7 f
- [DBEXPRESS]
: X' R. V) Z9 T6 e - sqldir=mysql_sql
; R- R* X( l; y) B& g. M& \5 A - Drivername=mysql8 Q+ T( _) k/ e1 {/ J
- Database=test0 J' f( _% [$ q! c" K H! p, _" Z
- Hostname=localhost1 A5 [' K f$ L% T5 P6 h9 [7 P a
- User_name=testuser
+ u2 W7 v' T' T- P4 n - Password=my_password4 r: W* P6 @" q
- GetDriverFunc=getSQLDriverMYSQL- X& D R" P" W! L( H! |) t6 ?* A% \* d! }
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 F. y; X9 K/ a9 I6 _
- LibraryName=./libsqlmy.so: H, U, w8 U3 x+ z2 g
- Active=1
& m# D6 E1 }" e, o8 o; L. ~/ ~ - ---example---
8 l, F4 ~. i4 H( {2 A - 8 u1 c% `* b; `7 e2 m/ |) U
- On a windows box, also running the MySQL server locally, it would be:) Y5 R0 y% s/ C( h) C
- ---example---' T" j, B- I9 K! y6 q O& T
- [DBEXPRESS]1 \# m. ? R! e& L) |$ J, \ G" Z; R; l
- sqldir=mysql_sql
) E4 M' {7 z5 R! ?' F; G - Drivername=mysql
1 r9 C% j# Z% h( A; B - Database=test
) Q; W; d. o% d8 j8 @4 R - Hostname=127.0.0.1 U( Q0 b3 R) M! K
- User_name=testuser; ]0 D# _2 h% \9 S$ C
- Password=my_password
* `& J" U' w9 P" {1 s - GetDriverFunc=getSQLDriverMYSQL G* h& Q+ M/ W0 {. M
- VendorLib=libmysql.dll: R( S. W" r# S" B e& H D
- LibraryName=dbexpmysql.dll& p! k0 x1 `# x
- Active=1
( k; O S! P" [4 l/ Q q - ---example----
0 }5 Z$ v! |" N! A" i& w - - written 02.03.04 by pwk.linuxfan, J3 ^9 V5 }1 z. T( X7 R) y# P
- # y4 N( v* S2 i( e1 G- I
复制代码 |
|