|
|
麻烦翻译一下,下面这段文章:xhan ) n3 e7 w% G5 I) {2 e) t3 l( e( V
2 [. D3 A6 C- @3 a. ?, k
-
8 p+ c7 L1 S' ~9 s( @6 X - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######* A! J, b$ \8 i
- % P% |! u, \3 v7 O
- ### What we need ###! ]6 s2 O! S( S6 i7 d$ \$ K
- Naturally, we will need a MySQL server to store the data for us, this document 3 J5 T. K$ n4 w: x$ w- S
- will not explain how this can be done - there are documents out there for the " U' i: d% k) Y/ e( m
- interested. The requirements include a (empty) database for TeamSpeak to use
* l9 }# H5 M/ @ - and a user account (username + password) that has the permissions to do stuff: w& [' N3 ?( p
- with the database. Additionally, you will need a vendor library installed on the$ z: u' [2 e# ?. `' L, O% v
- local machine, this came with my MySQL install.
) F, V, h' m, s7 y% y5 g: K* J! T: E5 i - These instructions will not tell you how you might transfer your data from the" B" x# M- Q) ]: |
- SQLite database to the MySQL database, we start with a clean and empty MySQL
! X: X$ G' z7 @# g - database.
' O4 N) m8 [* E$ T, y0 W+ i - Some users have reported ways to import a SQLite database into MySQL, but at; e- t$ K! ~" ~0 O5 I R
- the time of writing, there are still too many issues - check the current status, S7 h; T* D* `, G2 J( F
- in the TeamSpeak forums if you are interested.: g) Z3 n! O% S; ~6 H$ A, i- I, u
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 M- T+ C3 i+ U8 w" g) W P5 ?5 `8 H
- Borland was used. This driver can only interface with the client library that
M3 ?0 I* N i6 S - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 R; y& }# y: \# T9 h# L - client library - basically all you have to do is to use a 3.x client library as
) `3 D3 F) @* ?- L8 A - "VendorLib" and a 4.x database to connect to.
3 K- T* y( \/ S! E5 o- L6 [$ l - If you need more info about dbExpress, you can contact Borland.
9 U- s+ v; A4 `9 \+ l1 Q+ f$ A
: }/ D/ ?: n, F d0 ~- ### Doing the work ###' I s$ N |) w( k& E+ R( U
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* r" ^/ p7 d' R0 k
- the perquisites right, just open your server.ini file, and add this section at- Z/ R/ S P! Y$ } p" Y+ X8 V2 j
- the end:5 E8 ?& v: c/ D. y6 O' |9 B8 I* ~
- ---cut here--- [7 P/ R: j+ ^! _0 b0 ?# @
- [DBEXPRESS] u5 @7 P: V2 P& D
- sqldir=mysql_sql
N9 |3 d) c- c - Drivername=mysql
4 U. I" I/ e: \, a - Database=Your_Database_Name_Here
8 }1 v8 O, n! }* W - Hostname=The_PC_the_MySQL-Server_is_on6 g9 t* j3 B" @% f
- User_name=User_name_on_the_MySQL-Server
( G. H& h0 R' e: k# H# ~) q! N - Password=Password_to_go_with_above_user_name- w5 O" O P |8 N
- GetDriverFunc=getSQLDriverMYSQL
$ y$ t, K3 o9 N! t0 ?- t: C- V - VendorLib=path_pointing_at_your_mysql_vendor_lib! |* i+ z8 y# a% B; t
- LibraryName=path_to_libsqlmy_libary
; ~# B4 h# N6 N2 J" t; M; ^9 E - Active=1
- @( P6 @2 U+ m" w - ---cut here---" x- N: I, R5 }& B; ^! u+ a
- In my environment (a linux box with a MySQL server running locally) I have:8 d* a3 ~# Y1 f' E: J7 }
- ---example---
7 q# I4 M. M( n( F( _& E# q$ F - [DBEXPRESS]0 G' _* m2 x( p- ^( b1 H2 ?
- sqldir=mysql_sql0 D% Q/ R( [* c8 Y ^+ Y3 F2 Z/ F( C
- Drivername=mysql
3 f0 K5 s. R+ }; [5 H9 Z - Database=test2 F* {, p4 e* k% j0 a" ?- g' f
- Hostname=localhost
8 w6 X* L. `5 z. V - User_name=testuser# w6 h1 a9 X: K7 m U* U, u7 ~/ r3 }) a
- Password=my_password# [ z) G% ~+ Q8 h1 O7 F
- GetDriverFunc=getSQLDriverMYSQL
3 T+ B: D& |4 Q% r3 h7 Z! H. J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" q( f. \; H; E. {
- LibraryName=./libsqlmy.so
0 \( G; n- N0 R0 t) B+ q - Active=1
! E- I& }) h, I: ~ - ---example---/ R! L8 V4 K7 y$ C$ M! [
" E) B% S- U( l' g, A; {+ j- n- On a windows box, also running the MySQL server locally, it would be:
, n+ G' a, ?5 g/ K - ---example---4 B, F8 q0 D. ]4 V6 Z1 t% U
- [DBEXPRESS]0 [9 Q! C5 H% O
- sqldir=mysql_sql5 C/ B" x) P& C; z1 N
- Drivername=mysql
; o) Y9 Q3 ?! a/ l+ h+ P - Database=test
* L+ A% f9 K0 U& R - Hostname=127.0.0.1
9 o0 ~2 ~3 P7 L+ s - User_name=testuser
" F, O5 h* B& {$ @1 q& Q: g F - Password=my_password& t$ }4 B l2 E& H
- GetDriverFunc=getSQLDriverMYSQL
3 P$ L7 @! w; [0 m4 @2 g, r - VendorLib=libmysql.dll
% b9 [6 Z& F1 i2 _) j5 u- i - LibraryName=dbexpmysql.dll
! R0 I$ v# g( ]4 d7 S' j5 _ - Active=19 i% N# z) q5 H" x& t; P; Z9 [
- ---example----
' Z, r2 a5 E! m% ` - - written 02.03.04 by pwk.linuxfan) i; g/ l5 W- t: F
- ( l/ F) A& V: K9 i3 w
复制代码 |
|