|
|
麻烦翻译一下,下面这段文章:xhan 1 ^3 A+ I9 I9 V7 R6 t' U
4 U' J% C' W1 w3 N3 B$ j- : T, J0 M* o7 @4 `
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. |8 K' W" R y) S3 P" Z4 R9 Y - 3 }4 t& s) m$ ~ M: N) \' v3 I
- ### What we need ###
' F; R# d3 H5 p3 a- c4 `' t - Naturally, we will need a MySQL server to store the data for us, this document 2 e; P- K) L! a* ?# v
- will not explain how this can be done - there are documents out there for the % i* b# l8 ]; a/ C( j W9 I
- interested. The requirements include a (empty) database for TeamSpeak to use3 Q* f. o, I6 t. m2 v. d
- and a user account (username + password) that has the permissions to do stuff( g# i+ w3 \9 B7 @. {: }
- with the database. Additionally, you will need a vendor library installed on the
# c% C- S8 @1 ^2 u, H - local machine, this came with my MySQL install.
" R- J: J" B6 A3 T - These instructions will not tell you how you might transfer your data from the( Q% A% n+ d' W A; n* c0 g
- SQLite database to the MySQL database, we start with a clean and empty MySQL! Y$ N; k: l- c9 C! W/ S* v; [
- database.
: g! J7 V% m8 c: `! J7 x3 ]# U - Some users have reported ways to import a SQLite database into MySQL, but at
( F# _4 x3 v( x% q' L - the time of writing, there are still too many issues - check the current status
8 c6 D. V- }; w* [ t - in the TeamSpeak forums if you are interested.
, i8 I5 |9 V% D n" ?6 D - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 ~8 @+ Y; f& T v( A$ F! z - Borland was used. This driver can only interface with the client library that
& m6 h( u' v m) _ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 _8 S+ D9 G2 {/ p2 ] - client library - basically all you have to do is to use a 3.x client library as
4 I; Q# J4 o6 D2 q - "VendorLib" and a 4.x database to connect to.
! r0 w& u% ^. E+ Z5 ^& m - If you need more info about dbExpress, you can contact Borland.. y; M0 u x/ Q1 i6 u" y5 S
- , T+ `$ q( X% P( ]& L S& X
- ### Doing the work ###2 E+ D& Y1 R! Q$ _! a- {- l7 `
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 Y6 o) h; [ x+ U - the perquisites right, just open your server.ini file, and add this section at
/ P6 X" Q+ E7 u: X! G - the end:
9 Y4 I" h$ p" d' V - ---cut here---/ l0 B1 d; G9 ?8 y% x* n# M- g
- [DBEXPRESS]
* K4 `, g9 y- @ - sqldir=mysql_sql3 j" c8 e* j: N+ `* i, B* {: t
- Drivername=mysql
) _0 u& a( B q. b0 f" Q5 K - Database=Your_Database_Name_Here
8 |* m# {4 q% x0 {% B9 H0 S" U - Hostname=The_PC_the_MySQL-Server_is_on2 h7 t* M9 o1 K+ i0 q% M0 {2 @
- User_name=User_name_on_the_MySQL-Server, ` H) W7 ]( }% }4 {& i
- Password=Password_to_go_with_above_user_name
+ _. b6 p! u8 @: M2 M - GetDriverFunc=getSQLDriverMYSQL
- x% ]) X `9 H% o7 `7 g' n - VendorLib=path_pointing_at_your_mysql_vendor_lib
( r; I; {8 B1 X; I& \ - LibraryName=path_to_libsqlmy_libary7 B5 [1 t& P: _% t. r% R
- Active=1* `. m# r8 n& a( M U% x6 T5 c
- ---cut here---
7 q2 r3 Z- W. p) r1 G$ ~& t7 f - In my environment (a linux box with a MySQL server running locally) I have:
9 b3 n e0 M% X+ ~ - ---example---
" d, J: }& z# s' t! v" c( G- { - [DBEXPRESS]+ \7 U3 P) _1 l: W0 Q- {* S
- sqldir=mysql_sql
8 l2 f* L4 O' ?2 w9 a - Drivername=mysql
; h3 P0 z3 l. \% ]4 G0 ^1 \' { - Database=test
/ {% o' N; v: D8 A - Hostname=localhost
# S! o ?$ M7 U* m( Y* i - User_name=testuser5 R- `1 A. g0 N; g
- Password=my_password) J/ ], d5 Y8 e" b7 h6 ]
- GetDriverFunc=getSQLDriverMYSQL
" X; u: J. q+ M Q, R - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 O2 d( `2 ?! r- x( S
- LibraryName=./libsqlmy.so: h/ p8 d* v/ R# T& g$ W
- Active=1
* P) p' b7 F% C$ A - ---example---/ s& N9 W; `. v
- 5 i( }$ F5 ~/ F" b* @1 \2 z
- On a windows box, also running the MySQL server locally, it would be:6 X* o% s, Y# l+ f; V) d
- ---example---- J. ~; x$ {) X& D k- [2 |
- [DBEXPRESS]' Y* Q! V. N! y# u, }
- sqldir=mysql_sql
6 q+ }! G+ j) } - Drivername=mysql
/ U$ }4 i3 R9 _1 f, o - Database=test
; t9 z/ k7 u2 n. Z( M8 Q2 z - Hostname=127.0.0.1
% W9 q+ ]% N$ k) V6 m - User_name=testuser
|+ l& F' b$ k' e7 o" {/ J - Password=my_password
! @# Y5 ]* |( h - GetDriverFunc=getSQLDriverMYSQL! w& \: M" L: S; P6 E }4 _/ U0 f
- VendorLib=libmysql.dll% V6 d4 n+ z( H' L1 Z
- LibraryName=dbexpmysql.dll
2 G% t1 ] f& u8 }) C - Active=1* ~5 C- ^' V) u, E% G8 U
- ---example----; V0 {* v# ?2 J
- - written 02.03.04 by pwk.linuxfan
! S, P9 ?2 S- T - 0 b) A2 }0 V2 U k
复制代码 |
|