|
|
麻烦翻译一下,下面这段文章:xhan
5 K7 [1 G1 n+ Q1 X6 r( j, t' E8 ?% W5 a, d: w$ _- T
-
+ w2 \/ R. F# f - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( S9 D3 A. w# ~; _3 w- n. m9 n3 n - ; a, F& z3 T. b, U3 T
- ### What we need ###1 D' G4 X m' i/ l
- Naturally, we will need a MySQL server to store the data for us, this document & ?4 k/ h8 a5 ~. U! e6 G
- will not explain how this can be done - there are documents out there for the 4 A' [/ O1 g, O! I
- interested. The requirements include a (empty) database for TeamSpeak to use
5 o9 |' Y6 H" I" U - and a user account (username + password) that has the permissions to do stuff' j( k3 l2 _ w4 T3 ]: p# t; a
- with the database. Additionally, you will need a vendor library installed on the. o- S1 X: ?2 O4 B2 Y) J
- local machine, this came with my MySQL install.
( v4 I! Q, U4 n9 N' i" a! |- r - These instructions will not tell you how you might transfer your data from the
- t& n$ G# }: x& h( U - SQLite database to the MySQL database, we start with a clean and empty MySQL9 ^: Z" `$ J A7 I
- database.. X7 A2 i( f. b* U/ H
- Some users have reported ways to import a SQLite database into MySQL, but at; c6 ~- g8 c6 ^0 x
- the time of writing, there are still too many issues - check the current status% `, t w; g# R9 @
- in the TeamSpeak forums if you are interested.8 r1 ?6 @) @% n' a) k' p1 ] I
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) P# S" ]$ q b7 v/ M+ N
- Borland was used. This driver can only interface with the client library that % ]' s* k# o8 n7 q" D6 Z
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 u! W2 n. ~' `* j0 z - client library - basically all you have to do is to use a 3.x client library as
- _$ m. L. O1 [' Q; N/ t J7 U - "VendorLib" and a 4.x database to connect to.3 |/ x& v2 C7 e$ t. o ]
- If you need more info about dbExpress, you can contact Borland.' W- ~! y" a, d( f
- + b; Y1 N* @3 T0 H& I) c
- ### Doing the work ###
9 e, B7 U& g9 R7 E$ @ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* g. E9 A# p7 g) d' z% q
- the perquisites right, just open your server.ini file, and add this section at! e% X& _6 `$ }6 E
- the end:5 t# |5 s& c8 \9 }- d1 Q
- ---cut here---0 ~; `/ o7 V! P3 k
- [DBEXPRESS]3 {8 F9 @2 w" p9 A$ E
- sqldir=mysql_sql2 [' q9 [$ I: s# O; U6 V1 l
- Drivername=mysql6 T! w9 S P$ P) j) e& l) q5 |
- Database=Your_Database_Name_Here4 t9 r0 H. [3 ], ^
- Hostname=The_PC_the_MySQL-Server_is_on
7 E- _4 x7 ] o7 [4 Q) _5 p# [ - User_name=User_name_on_the_MySQL-Server. L' Z$ y/ v$ {: i" T
- Password=Password_to_go_with_above_user_name, @9 C8 {+ p" O# `% P: I
- GetDriverFunc=getSQLDriverMYSQL
" m u% }! H! | - VendorLib=path_pointing_at_your_mysql_vendor_lib
% Y; P! m; M) }( o - LibraryName=path_to_libsqlmy_libary* r/ J9 B" t. f. \2 E; d/ Q( H5 W
- Active=17 S7 e$ d5 Y; s4 [3 v3 q$ H6 V* t
- ---cut here---( x7 y- ~4 d- E1 |
- In my environment (a linux box with a MySQL server running locally) I have:
" f6 g+ B# B0 _1 N+ n0 H; x - ---example---
) ]; s5 [8 O. e& n# t - [DBEXPRESS]+ F0 N& O& I' o* A7 ]
- sqldir=mysql_sql
, i: s& e/ z8 }, `7 r - Drivername=mysql
! B- J5 D( H& |$ A2 V - Database=test
) l; x& M9 M! O - Hostname=localhost) F7 X0 w" `5 B6 o! M' ?
- User_name=testuser+ w: B3 [6 f$ { y! D, c% Q
- Password=my_password1 z& A1 \1 Y( n& H0 E8 c% m
- GetDriverFunc=getSQLDriverMYSQL
, ?# F% V1 q9 w8 } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 C, O* ?$ L G4 X1 {, i - LibraryName=./libsqlmy.so
( l; c6 n" _1 C( ]6 q" e! m/ ] - Active=1
0 B! g0 g) I. k% w - ---example---
8 y" u8 T$ K: L6 L, c7 j
0 f/ [3 f; ~9 I' `- On a windows box, also running the MySQL server locally, it would be:" i% d& P) a; {- n
- ---example---
+ t) n1 f( }2 @# Z3 r - [DBEXPRESS]
/ `3 E1 |( n/ ]! n$ b; T - sqldir=mysql_sql4 I9 o2 D0 W1 h
- Drivername=mysql3 m2 N0 p' g- d- G3 R
- Database=test( k+ T* M0 Q" V+ |
- Hostname=127.0.0.1. _% S" r4 p, \* J. @
- User_name=testuser
/ {/ o& D- B/ `+ o: g* a, G1 A - Password=my_password
8 \- S% \/ `8 D! \6 h7 O0 F! } - GetDriverFunc=getSQLDriverMYSQL
3 B( G. N0 T4 \" |0 o2 y; a* H1 K; l - VendorLib=libmysql.dll
0 \0 C% A1 d. B) J% R& l U g - LibraryName=dbexpmysql.dll+ \/ P3 w' i8 _5 ^! A
- Active=1
5 b! C) l6 ^6 t2 Y) V8 r' u. @ - ---example----6 P$ ]8 N; @" S6 g8 g
- - written 02.03.04 by pwk.linuxfan
% ~# v2 T8 z/ ~8 W* f V - . g1 U. L+ M9 F# L m, {- J
复制代码 |
|