|
|
麻烦翻译一下,下面这段文章:xhan . I. B, P* ~) U+ Q
$ ], L1 E( O/ `; c/ l
-
- m' H* z$ s1 T# p' P - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 j& f* |) b. ~
- 0 g }9 S3 _9 U3 y
- ### What we need ###/ h+ K: P' [: P0 N6 }) e% Q. m- N
- Naturally, we will need a MySQL server to store the data for us, this document
# p* \& Y. {+ O/ ?# o' P- Z - will not explain how this can be done - there are documents out there for the , N7 \- m2 J5 ^3 X7 o
- interested. The requirements include a (empty) database for TeamSpeak to use
) D/ b5 m5 f, C" U8 I- v - and a user account (username + password) that has the permissions to do stuff; {. {3 H: t4 g4 r& x
- with the database. Additionally, you will need a vendor library installed on the
% e; t/ u; w5 R& ?4 U - local machine, this came with my MySQL install.
8 V) ]: Z3 l* ]; _. ?7 S# B, f - These instructions will not tell you how you might transfer your data from the1 V) y9 f% {0 @& a0 T
- SQLite database to the MySQL database, we start with a clean and empty MySQL
% [7 b- w- O8 B1 W# h- G6 ^ - database.: U) X9 a) v) Y6 g& I& P! h* d& J
- Some users have reported ways to import a SQLite database into MySQL, but at ]% T8 l4 s% r! R' \9 @" d
- the time of writing, there are still too many issues - check the current status
- Z: h/ B8 l# n - in the TeamSpeak forums if you are interested.+ @( S' e: ^6 w, @7 K; X4 {: X6 w
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 w K% z3 T! s# }0 {
- Borland was used. This driver can only interface with the client library that * i) A' W# u- @) Q: k: I
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 H; s6 v& p5 c8 r; O! h
- client library - basically all you have to do is to use a 3.x client library as
3 Q: t8 }- k( z9 p! X - "VendorLib" and a 4.x database to connect to. f$ z% L5 T( Y) e" \% H3 I" d
- If you need more info about dbExpress, you can contact Borland.! B; I! W4 ` Z/ G [: u3 P
6 o9 k) P D2 @. Z- ### Doing the work ###- R; M, y! |! e8 [0 g+ ^6 C
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' c( c' @/ S8 P/ U; c - the perquisites right, just open your server.ini file, and add this section at, E% ]* B. A) x; |1 o
- the end:
6 `# c- U. X, a8 q+ a. L - ---cut here---
; y, H' H8 z* K5 \ - [DBEXPRESS]
1 ?) q- i! |7 q - sqldir=mysql_sql$ G7 n2 ^; E! @' }$ }2 N9 I
- Drivername=mysql- |* H9 N( Q. B- h8 M2 q3 j# Z
- Database=Your_Database_Name_Here
7 X9 ?7 T# B& y3 H& Q - Hostname=The_PC_the_MySQL-Server_is_on& d# q, I3 n- C5 S. k p1 U9 v( h% Q# u
- User_name=User_name_on_the_MySQL-Server
' A5 r5 o* y* b, c" q. C" p - Password=Password_to_go_with_above_user_name
9 p# S$ T' K T, J3 Q - GetDriverFunc=getSQLDriverMYSQL
9 W( a" W6 d6 x- L1 k* w, n _ - VendorLib=path_pointing_at_your_mysql_vendor_lib
8 F$ ^" A3 ?9 `3 W* D - LibraryName=path_to_libsqlmy_libary/ b9 x' k" r: [2 r0 H! W i- ^
- Active=1
/ s7 { }9 }' C& h - ---cut here---; J p# t# _& X7 r3 q( K" @ }
- In my environment (a linux box with a MySQL server running locally) I have:
+ a& Z9 b( N9 P, S% `+ `/ i - ---example---% m: K! }! R) e0 G
- [DBEXPRESS]
5 s" m6 Q6 `* ]" W7 ~1 ^. I; M - sqldir=mysql_sql
( _7 P: D/ m- g7 L9 D; P - Drivername=mysql
. P/ u4 a5 Q" E1 \' ? - Database=test
0 d# Y5 ]' M/ c! `0 w& G - Hostname=localhost
* b% ?6 n8 R+ [7 M9 g - User_name=testuser/ c8 L$ q8 V' A1 g7 o
- Password=my_password8 l, T+ I9 D* N8 \, F
- GetDriverFunc=getSQLDriverMYSQL' e) l' g7 i# O- J/ S7 k; @/ L" G
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- N7 t! h9 K; g
- LibraryName=./libsqlmy.so% ~3 k( K; m% b; Y5 @
- Active=15 W* Z3 e6 w, S
- ---example---4 S6 r- e# Y3 M3 [/ s1 y
- ) I9 \0 d. {$ {! _
- On a windows box, also running the MySQL server locally, it would be:
9 t" h @# ^; s; q/ \$ L - ---example---) p/ b7 L0 a- P
- [DBEXPRESS]
- Y; H# x8 W; F, N) {: A C - sqldir=mysql_sql
5 X, I$ v7 B- Z1 m( b& x) o - Drivername=mysql% h+ d4 H) G S- i2 T! G; s/ g' r
- Database=test
- T8 p" [( s | L; ` - Hostname=127.0.0.1
0 h q9 m6 V. w - User_name=testuser3 ]5 G9 z; Q, q8 t
- Password=my_password
! o$ F( K* X" E- P* J" H - GetDriverFunc=getSQLDriverMYSQL
% v- V h6 d- i- g; H - VendorLib=libmysql.dll
5 t# D$ k& ]* K D) X - LibraryName=dbexpmysql.dll( q, p- C3 L) Z v8 t6 Y
- Active=1
) ?* m! Y! r: ~8 i3 Y6 D; k - ---example----
; Y3 T. {/ l& ] - - written 02.03.04 by pwk.linuxfan
+ w. f! q# s K1 \1 c - / R( Z6 y5 g! [0 c3 R8 i
复制代码 |
|