|
|
麻烦翻译一下,下面这段文章:xhan 2 g5 K- U9 [& ~8 c# `
1 z% n& v6 I X; x
-
9 U* ]: ^5 q: p3 v& m2 |( V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 ~0 U7 ^6 e% A! L0 G6 m+ J% x) u! b
. ^+ M: w- g; y2 I' \/ M8 C0 I- ### What we need ###/ P3 V" B/ y% Y: j) w5 e- t! e- `. R
- Naturally, we will need a MySQL server to store the data for us, this document
) Z& a3 Y' q3 c T - will not explain how this can be done - there are documents out there for the
h* k% J: k( f5 W( ?/ A1 D) t8 b: T - interested. The requirements include a (empty) database for TeamSpeak to use
" C3 _( C# v* c7 B - and a user account (username + password) that has the permissions to do stuff
4 H: `9 ^* L- G8 C - with the database. Additionally, you will need a vendor library installed on the; n6 S a( Y6 k) K) g: W
- local machine, this came with my MySQL install." _" `( g. L1 a# [# o$ T: F
- These instructions will not tell you how you might transfer your data from the+ r: ~# M- Z+ ?- F0 \( j" ~
- SQLite database to the MySQL database, we start with a clean and empty MySQL1 |1 F0 h$ M& c
- database." v% {0 W3 e9 O9 ^. u
- Some users have reported ways to import a SQLite database into MySQL, but at& W3 O3 M2 V8 q+ o( f, R
- the time of writing, there are still too many issues - check the current status
6 c" P! A% V1 u - in the TeamSpeak forums if you are interested.
" j2 v9 x Q7 ]' m. D - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
Z, i5 K6 k/ Q' J - Borland was used. This driver can only interface with the client library that $ R; m+ ~2 C6 O$ x, o
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this& Z0 D: l" p9 o' g, f4 b2 j# f* {0 e
- client library - basically all you have to do is to use a 3.x client library as
/ V" G. t8 A8 b- b1 P4 i - "VendorLib" and a 4.x database to connect to.0 m* U8 F5 }; r! v: `* B
- If you need more info about dbExpress, you can contact Borland.& D H" j' w5 X2 a( e! n
7 f' {" M9 G$ S$ u. e/ j- ### Doing the work ###$ W6 t% s |5 X3 u) Q: `6 s
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. @0 z; I0 I2 b/ j8 L8 U - the perquisites right, just open your server.ini file, and add this section at+ ]' C8 m e+ p& |" Y5 w. F
- the end:$ @1 `" s6 |7 [
- ---cut here---
1 j% [* b9 L" p+ F5 L, h( N; K - [DBEXPRESS], y* o5 G& p5 N r5 B `5 t
- sqldir=mysql_sql
& L/ @1 p7 k3 _ - Drivername=mysql: Q0 ?& Q4 N9 v( i
- Database=Your_Database_Name_Here- E+ N4 ^# o2 |+ d9 X4 T
- Hostname=The_PC_the_MySQL-Server_is_on
) _/ V, }' {+ J" A# E5 E; t - User_name=User_name_on_the_MySQL-Server# U& b$ f2 b+ c& F) H) C
- Password=Password_to_go_with_above_user_name; Q6 k. w X& k4 M
- GetDriverFunc=getSQLDriverMYSQL4 b, D2 c/ M6 w, q4 ^$ k+ [- m- w2 B
- VendorLib=path_pointing_at_your_mysql_vendor_lib
# K* i" ~/ V0 E9 e1 {- J - LibraryName=path_to_libsqlmy_libary
9 e6 E/ }9 t% j - Active=1! y; `* N, a% A0 [0 P
- ---cut here---5 t& u9 |, A, d( ~ V) H
- In my environment (a linux box with a MySQL server running locally) I have:
7 l" w+ Q" U+ P- Z5 c - ---example---7 D/ y2 z; u7 w
- [DBEXPRESS]; P: L6 w6 g0 L; V2 \4 K& |6 U" }' [9 @
- sqldir=mysql_sql
t4 l% E: d8 L& F - Drivername=mysql
6 Z$ n6 Y/ D1 @% b8 m - Database=test
' o- L* P/ U% `" r4 J - Hostname=localhost
7 }, {. Z& l' p T! Q/ y' m - User_name=testuser' {% ^) S n3 w
- Password=my_password
! q% f9 {1 B, y - GetDriverFunc=getSQLDriverMYSQL, |" D% M5 h* n
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! A2 {& g& L9 F9 ^
- LibraryName=./libsqlmy.so
* Z) {# `" l: k/ Y8 M - Active=1$ u7 w6 g& k% j6 |
- ---example---
1 k9 d: l+ x% V" {
( f w9 [& o" x6 ?6 C# }+ l- On a windows box, also running the MySQL server locally, it would be:5 B" o% Z$ E2 L( x+ n8 _2 a
- ---example---
! G1 N- `( u0 a4 D) f - [DBEXPRESS]
) M. f# M M1 G3 k - sqldir=mysql_sql( B, e% Z4 O' l; T, _6 X9 V
- Drivername=mysql, T& S# W# P- j
- Database=test
0 ?% k- v4 D/ j - Hostname=127.0.0.1
' r% A+ W$ |6 I/ w) } - User_name=testuser6 k3 s5 n$ x' \
- Password=my_password
3 V! _! O: S3 D8 I2 J6 Z - GetDriverFunc=getSQLDriverMYSQL0 W' a2 e, Z3 E: I! m) u0 t* H
- VendorLib=libmysql.dll: w9 c) F8 ?- u3 u4 y% ]
- LibraryName=dbexpmysql.dll1 U! l9 W! I9 z# W
- Active=1
4 K8 R6 D2 ~3 a. V# R - ---example----0 i! u' _2 b% d6 I5 |; J# c' z, \
- - written 02.03.04 by pwk.linuxfan
' z- ?, n6 u6 D( ]( U) D9 T B- Y - 8 P0 j3 \* V/ H9 K; \# L
复制代码 |
|