|
|
麻烦翻译一下,下面这段文章:xhan
: E1 T5 i! x/ f* q3 [, E+ k
+ A. r1 {8 L. C/ d/ O# v" g0 t-
& s* h: ~6 r' z2 J8 B9 K g' w: { - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 P) O5 c+ ^* q9 _ - 8 [/ C" a7 X/ i
- ### What we need ###9 p$ J) {0 ~. _
- Naturally, we will need a MySQL server to store the data for us, this document % s3 S/ o5 {5 G, W3 l
- will not explain how this can be done - there are documents out there for the
1 m: F' N+ N* y7 E3 ^ - interested. The requirements include a (empty) database for TeamSpeak to use1 D2 p8 d: R$ ]9 L7 p/ Y" ~
- and a user account (username + password) that has the permissions to do stuff
& m: a+ E/ G/ `) H7 ]$ ~ `4 t0 P - with the database. Additionally, you will need a vendor library installed on the
, G- e7 x2 O6 S& Z: T/ {! d - local machine, this came with my MySQL install.
# H C+ ~: r2 Z8 J - These instructions will not tell you how you might transfer your data from the
3 H' ^( {7 P) J W: [- q1 d - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 E' @# @6 ?1 s4 z - database.
% S: {0 S+ a' t$ Z& p% O* n - Some users have reported ways to import a SQLite database into MySQL, but at; p" \& p2 E5 b0 _' v7 q% N
- the time of writing, there are still too many issues - check the current status
- p" g3 G8 I1 K& }/ P8 |; j' I - in the TeamSpeak forums if you are interested.* w* k u. G! ?1 G
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) S6 \( B) w. s& H: c - Borland was used. This driver can only interface with the client library that ! U7 y2 h: f3 N% w& i/ b1 T* e
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 N5 v$ @! P+ W5 R6 F. i
- client library - basically all you have to do is to use a 3.x client library as : u- p K9 d. B" ^! g4 w9 P
- "VendorLib" and a 4.x database to connect to.
$ X% G, C& k! X! o# T1 ~, b - If you need more info about dbExpress, you can contact Borland.# n, ?; B. m4 m& g( r$ i
% o; w( @: c2 U9 L- ### Doing the work ###6 U, ?1 K+ n9 P# F& q$ \0 O- ?
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 {( {6 c3 @$ e4 z( f8 z# @ - the perquisites right, just open your server.ini file, and add this section at$ e7 n: O b2 S* {6 W1 {
- the end:
7 J* `2 s p, P; _& S0 Y6 s - ---cut here---/ v: y- ~) T( D! v- k* F
- [DBEXPRESS]0 Q4 \3 x1 ~3 k& I6 ]2 p
- sqldir=mysql_sql
0 p5 f v" w) G7 Q - Drivername=mysql
1 j) Z3 ^6 ?; \2 C - Database=Your_Database_Name_Here
7 O, ~0 u0 I- e Z4 d* V - Hostname=The_PC_the_MySQL-Server_is_on
4 A7 D( d1 H: ?# j7 t - User_name=User_name_on_the_MySQL-Server" {- B6 x0 Y* P( ` X% m
- Password=Password_to_go_with_above_user_name; i. H) U$ V2 [% z: E% U
- GetDriverFunc=getSQLDriverMYSQL
1 @( i9 b0 u( @! @ - VendorLib=path_pointing_at_your_mysql_vendor_lib
( h% |+ F m5 t: ~: S/ T% ~ - LibraryName=path_to_libsqlmy_libary: o A5 m+ f8 r; F( [* ]0 e
- Active=1
5 h" ?( u) l6 e( ~ - ---cut here---
# ~( @0 l5 ]3 }! O - In my environment (a linux box with a MySQL server running locally) I have:" y7 o- t" v$ v; c6 \" G4 ?
- ---example---" r( H, r) `. n$ t. [: L
- [DBEXPRESS]
& b! ]# \$ A, r4 X/ W1 k - sqldir=mysql_sql2 Q" S3 Z! _- @9 t+ K; c; m: i; y
- Drivername=mysql+ a2 H) U& N0 t& G: _+ F9 Y( F
- Database=test
, R4 i1 g) D$ \ - Hostname=localhost
6 n M, y! s9 s3 C( s2 h - User_name=testuser0 E# Y* F; \# U+ |- N5 f
- Password=my_password, k" _7 Z5 K, `7 l& R
- GetDriverFunc=getSQLDriverMYSQL
" X0 G) @( B7 d) K6 v - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0' l X3 s5 j% E+ V/ m. D
- LibraryName=./libsqlmy.so
; d5 l3 |3 R- ^5 H8 |4 ?: ^ - Active=1) B5 m# H) B5 Y) Z+ y+ A
- ---example---
& u, Q# U7 |* z, h - " G" H+ ~, [6 p8 M
- On a windows box, also running the MySQL server locally, it would be:
( [% B& R+ X, Z2 D9 z( Q - ---example---" L# _+ p6 ^% a+ L" V
- [DBEXPRESS]9 r3 m' N p9 g4 U
- sqldir=mysql_sql. Y% p- [4 Z% |( [
- Drivername=mysql8 F1 F: X1 Z( V5 G. s) M- W, i) a
- Database=test! o4 D) h1 K8 L
- Hostname=127.0.0.1
% R& }1 s- J( d1 y2 R* d, q - User_name=testuser) [/ o8 ^& D0 d$ L: p1 I/ @; s( }9 Z* \
- Password=my_password
+ \! x( S9 _ T5 g; k& c - GetDriverFunc=getSQLDriverMYSQL$ N- U2 |! |3 Y" ~: q+ g+ s, e
- VendorLib=libmysql.dll
$ M1 L! j" q+ s: H! q - LibraryName=dbexpmysql.dll- E# @. T z* k& i$ I
- Active=1
! ~0 q4 @7 J; U5 A9 D: N5 v - ---example----
, b9 v& x9 r: Y0 ~0 E% \ - - written 02.03.04 by pwk.linuxfan
5 W' R9 Q7 P: W7 U6 [
5 M) }0 Z4 x0 R! r! d }5 t$ T
复制代码 |
|