|
|
麻烦翻译一下,下面这段文章:xhan
- ]/ @2 \& t' }. }5 }
4 A% S, t f2 j% k& S( d-
- i# o$ w" q, |7 h - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 ?9 \* } k, a3 E
- Z, e- u, b$ u# N' k2 K8 [( @- ### What we need ### i' b/ [( D$ p# F* Q) \8 Y: x
- Naturally, we will need a MySQL server to store the data for us, this document
4 T- D6 p$ v# K# ~) l' h - will not explain how this can be done - there are documents out there for the * A9 l% s( w4 x0 T
- interested. The requirements include a (empty) database for TeamSpeak to use
' o% l& |& ]5 P: z' |3 c - and a user account (username + password) that has the permissions to do stuff
. q {# i. V+ o G i - with the database. Additionally, you will need a vendor library installed on the
2 M- y2 T: `1 F - local machine, this came with my MySQL install.
" G1 L( {9 y+ o3 t - These instructions will not tell you how you might transfer your data from the
' `6 c( F+ T5 A; g/ h - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 X8 O6 s) t: D - database.9 I/ N. b* ]/ x3 E$ W: {7 s
- Some users have reported ways to import a SQLite database into MySQL, but at+ i4 k! {% W0 i( b- Q
- the time of writing, there are still too many issues - check the current status
/ d8 A! v" z4 Q3 K- t' w1 d# ?# q& j - in the TeamSpeak forums if you are interested.- H/ m0 d8 S8 ?+ \2 u
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ @( u' m, e/ ?/ \ - Borland was used. This driver can only interface with the client library that
1 u7 d+ o1 S, ]" k" @9 { - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 ~: B+ u7 j. |0 B
- client library - basically all you have to do is to use a 3.x client library as
2 {# N$ d6 A& A3 ` - "VendorLib" and a 4.x database to connect to.9 O# C+ [' F3 P$ W5 X
- If you need more info about dbExpress, you can contact Borland." e5 O% ]" m/ S5 T
" H( `2 S) X& F0 k- X: T- ### Doing the work ###
; N1 q6 Y9 W1 {/ n0 A+ i - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ P& |5 k" Y) d/ A- ]; P - the perquisites right, just open your server.ini file, and add this section at
, r; j) \% X) _ - the end:4 z* u5 S7 Y5 W' s
- ---cut here---
$ S- @: v1 t7 c/ r- p - [DBEXPRESS]
: Z ?3 d3 Y2 c- F1 i9 f* v6 y x* L - sqldir=mysql_sql
+ g5 x: T+ _! ^9 f7 [0 [7 d& j - Drivername=mysql8 f R6 I. I7 s3 t0 L3 V
- Database=Your_Database_Name_Here1 ~" K2 d( ]) |: \4 Y
- Hostname=The_PC_the_MySQL-Server_is_on, Z+ k8 f8 c2 I! P% E7 I/ @
- User_name=User_name_on_the_MySQL-Server
) J- @/ i+ n/ i9 ]. @ - Password=Password_to_go_with_above_user_name
; \- x; R) T4 L, V - GetDriverFunc=getSQLDriverMYSQL
5 |2 ~, `2 p7 P5 z# [ t, w - VendorLib=path_pointing_at_your_mysql_vendor_lib5 L0 n( N8 Q+ k4 o) Q9 [; F
- LibraryName=path_to_libsqlmy_libary# J, t4 [* }6 l$ P K2 L0 j
- Active=1
* I* M/ t4 v0 G - ---cut here---4 P0 I" r) p7 a# Y$ Z( S
- In my environment (a linux box with a MySQL server running locally) I have:
. H3 h5 C2 X) c# g3 n, T2 t, J - ---example---, ]: [0 ]- A) a4 C" |4 ~
- [DBEXPRESS]0 ]# A+ y9 ^! ^
- sqldir=mysql_sql) G- B: c1 j4 H3 `' M
- Drivername=mysql g: K7 e) y- W/ f T
- Database=test2 \3 @" b" K$ Y! R/ z) B
- Hostname=localhost* b' a, J9 W7 N. S, E' u
- User_name=testuser- c9 q9 G4 i4 x" ?2 B2 r% a
- Password=my_password2 P5 v! C$ c8 e
- GetDriverFunc=getSQLDriverMYSQL! ~/ X; O7 P; l' C& m
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; z$ Z$ W+ R" i: @. A - LibraryName=./libsqlmy.so
7 \6 ]2 u/ f4 f7 R. r+ R - Active=1- o& q4 p3 x: `2 e. H
- ---example---
9 K9 [+ [ m! X' X; a
7 V( i# ]+ q& P( [+ Z- On a windows box, also running the MySQL server locally, it would be:
! @3 ~6 [/ B) M - ---example---" x* N$ _- d! _$ u. X) j& O) y
- [DBEXPRESS]
- w1 o1 X) B, Y9 R) } - sqldir=mysql_sql
# E/ O; ]) W0 a( K- A0 ?& I - Drivername=mysql" }: b, f+ m+ E, n8 F; } o
- Database=test
& m+ \. P. j% ~% `, W/ u ^- u - Hostname=127.0.0.1- A3 m/ l. z% f0 j% {
- User_name=testuser3 u6 l: w- k: w4 h. p/ V
- Password=my_password1 _( u) H" H; v+ t$ u
- GetDriverFunc=getSQLDriverMYSQL
! y/ y& | }6 |! x! P, _# x0 [ - VendorLib=libmysql.dll9 n) Y+ w8 x2 V$ a
- LibraryName=dbexpmysql.dll; S0 c" F$ B. W* F1 U
- Active=1
; L$ M) m/ B# O1 E9 L5 M - ---example----
' L) c) M6 h; \- v) O - - written 02.03.04 by pwk.linuxfan+ C( z+ V& e. l6 _0 V4 ?& g% ?
- & u$ f7 D6 x, p% b6 e( l3 \
复制代码 |
|