|
|
麻烦翻译一下,下面这段文章:xhan
" v9 q( A3 }/ E2 V4 r C5 T' }6 C- B9 I. T% ^9 J1 @
-
. d' n8 l1 H2 T+ ]( ~ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 K: v% H% V! ~5 A/ `3 J
- u( M# m! _0 b `- ### What we need ###3 y" S6 ?! i h( y% S# O" f7 _
- Naturally, we will need a MySQL server to store the data for us, this document 6 U7 ?% D: U& D6 Q
- will not explain how this can be done - there are documents out there for the
: M8 N9 _% x' j4 P* b; A/ K: \ - interested. The requirements include a (empty) database for TeamSpeak to use4 f6 V( d8 H5 a- d& c0 O* L+ f
- and a user account (username + password) that has the permissions to do stuff
0 K8 R' p) e1 \ - with the database. Additionally, you will need a vendor library installed on the
+ Z9 a8 V6 l" O: p7 j" k$ e9 @ - local machine, this came with my MySQL install.
r4 V) b6 h+ e - These instructions will not tell you how you might transfer your data from the3 _3 K( P# s$ N6 k U
- SQLite database to the MySQL database, we start with a clean and empty MySQL
/ k. u: h+ ]$ N6 _2 H8 | - database.+ r, l5 h6 w5 e3 j+ h
- Some users have reported ways to import a SQLite database into MySQL, but at
: A( i! P- ^1 {- b' n1 o - the time of writing, there are still too many issues - check the current status
' Q+ B2 |& |$ Q Q- t; w - in the TeamSpeak forums if you are interested.
. Z! E& ~) G. _2 `1 s) J" ?2 A - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* n- ?3 S8 a6 Y4 d" }5 r4 { - Borland was used. This driver can only interface with the client library that $ Y8 G( z; p- R' F9 T
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this/ S3 Q: U3 c+ r3 Z
- client library - basically all you have to do is to use a 3.x client library as
: z% }9 Y+ A- U$ h1 q/ O3 S - "VendorLib" and a 4.x database to connect to.
9 V3 J2 Z+ C& z4 }7 j8 S2 t3 e - If you need more info about dbExpress, you can contact Borland.
^' i! m& k$ b8 c: s - - ]: t7 m8 p5 E5 o7 q+ q
- ### Doing the work ###
& x( \6 D f# F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all' P- l6 G; I3 G- U
- the perquisites right, just open your server.ini file, and add this section at; j1 B& r' a+ k' ?' G- k7 i0 x
- the end:
4 k+ ?/ A- f0 ~9 u8 K9 l - ---cut here---
7 N5 {/ T, _$ m4 r: ^ - [DBEXPRESS]2 w( G8 d1 J# I- \' X
- sqldir=mysql_sql
W" z6 {7 H' w4 [6 G - Drivername=mysql) {- q* r$ W8 N* c x+ H3 P, G
- Database=Your_Database_Name_Here
+ ?- W/ @3 D" Y+ O8 K - Hostname=The_PC_the_MySQL-Server_is_on
9 J ^$ T3 e2 J - User_name=User_name_on_the_MySQL-Server
, z* w# r, p" @( g' @4 T - Password=Password_to_go_with_above_user_name& M7 p# F# ?1 d1 F4 n R. D+ `% I+ q
- GetDriverFunc=getSQLDriverMYSQL6 k# W8 u: a2 J( P5 P% M
- VendorLib=path_pointing_at_your_mysql_vendor_lib
% G) t% Z- X! X- [/ Q" g5 t - LibraryName=path_to_libsqlmy_libary# p* ~! @& Z: A! M2 ^1 t6 w
- Active=12 g& C8 V; K1 l7 F
- ---cut here---5 p0 Q2 P, y! d( z5 B6 U
- In my environment (a linux box with a MySQL server running locally) I have:9 l& `" x6 a' I, A
- ---example---5 e( F, p5 s3 d2 j
- [DBEXPRESS]
5 o. r& y3 L1 n( m5 h - sqldir=mysql_sql3 T$ ]) j1 S0 I& J. A: N& b
- Drivername=mysql
! Y8 \* P+ Q: N" C) Z- X - Database=test
% _/ C; j, S0 S - Hostname=localhost
X% |, w6 I3 C2 Z# M - User_name=testuser
* o! [" A% l# L5 `; j4 d - Password=my_password0 \5 C/ w! k2 c! |
- GetDriverFunc=getSQLDriverMYSQL; c9 O1 O F" b+ J/ S+ d
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& J0 I8 @! \* |* Y2 `) R
- LibraryName=./libsqlmy.so
+ K: {" O- z5 r6 ` - Active=1
, D o0 R9 Z6 g& K/ W7 {( h" i - ---example---
7 O% p0 h: b5 e, |. S/ n9 \! L+ c! G" L
5 U! o9 [7 C5 c& F" W0 J$ N G- On a windows box, also running the MySQL server locally, it would be: g$ ^! o1 |( p8 C$ Y" b
- ---example---
" \; [% S) x9 k& r6 | - [DBEXPRESS]
# b' @4 c6 F q+ D& V" W - sqldir=mysql_sql
+ B# g, a% P/ B$ M" S8 P2 g - Drivername=mysql1 y3 }. |1 e( c% y* w, ?1 l( P
- Database=test
. d7 j+ S2 s: _- w! ` e# {/ f - Hostname=127.0.0.1
2 n) P' Q1 V" ^& t% \' r - User_name=testuser3 I* J6 ?, q$ j; _8 H& b
- Password=my_password
/ C" }/ @+ f! ~ ~* K# H" }$ Y - GetDriverFunc=getSQLDriverMYSQL
" ^. I; P$ U2 T, Z - VendorLib=libmysql.dll2 t n# ?6 {. `, ]9 j
- LibraryName=dbexpmysql.dll
0 T5 a$ t6 _, n) k' D& L - Active=1
v8 O5 P$ c& ^$ I. U" T. I - ---example----
0 H. d1 ]# n8 F7 _* v; J) ^ - - written 02.03.04 by pwk.linuxfan5 P& B3 k. O8 i+ X
% H! j' `1 F- [2 n; g8 {
复制代码 |
|