|
|
麻烦翻译一下,下面这段文章:xhan
% v5 W9 d+ R+ P# n U4 h
/ x( M& l* j, P-
( i. y6 Q" p1 r X; [$ k. y4 P - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& g4 `/ F4 S f4 D5 x* u. N7 v
- " ~. n; m3 v1 u6 j" y
- ### What we need ###$ H4 v4 o0 g3 q
- Naturally, we will need a MySQL server to store the data for us, this document
: ]: n8 T$ w6 x6 R/ e7 p# r. u - will not explain how this can be done - there are documents out there for the
: [7 C+ B4 }; P - interested. The requirements include a (empty) database for TeamSpeak to use2 Z, b; W& [7 n1 y. \1 M' n' I4 x
- and a user account (username + password) that has the permissions to do stuff. K+ w, a) T1 i
- with the database. Additionally, you will need a vendor library installed on the( `+ M$ t' V' x0 J. C
- local machine, this came with my MySQL install.
9 t; P6 J' k, h* T, W$ v3 j - These instructions will not tell you how you might transfer your data from the
6 ?6 T5 e7 \6 P1 a/ w' e - SQLite database to the MySQL database, we start with a clean and empty MySQL
* Y* Z: A( g+ V1 y9 q$ u. W - database.
9 F- k7 x$ X5 L, A. E7 w# J - Some users have reported ways to import a SQLite database into MySQL, but at
5 M0 ^# s5 P2 F" s5 H; N - the time of writing, there are still too many issues - check the current status
9 f5 M S3 j8 d) Y2 B5 { - in the TeamSpeak forums if you are interested.2 t3 _, V2 s. G7 h" [. k Y
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ C) d& _; c& e4 k2 w
- Borland was used. This driver can only interface with the client library that & p5 s- |9 w$ J" M! `
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- _5 Y9 Y4 e1 E; R; |
- client library - basically all you have to do is to use a 3.x client library as
. `9 z+ R& O; \1 R1 R. \ - "VendorLib" and a 4.x database to connect to.& d3 [0 e+ i5 `
- If you need more info about dbExpress, you can contact Borland.
! w2 Q+ E0 Q) {0 D- y
: h* }% H" q9 b1 ]* W' e- ### Doing the work ###
0 @* [" @# F! f1 L - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all L" [" F& r8 ]3 J- v
- the perquisites right, just open your server.ini file, and add this section at
5 m* F/ H1 s- d" E @( c' Y - the end:
' T7 w+ s& G9 w - ---cut here---' Y" Y* z. B' z& P) C' A
- [DBEXPRESS]
. I: @! l: l2 Z - sqldir=mysql_sql1 h1 t4 C8 y6 V
- Drivername=mysql; p6 I3 U) Y5 f
- Database=Your_Database_Name_Here6 K( D0 B: @+ q8 s
- Hostname=The_PC_the_MySQL-Server_is_on- ~% J/ J6 `) p/ {7 `+ g
- User_name=User_name_on_the_MySQL-Server
; f. ?7 d5 G1 e* v - Password=Password_to_go_with_above_user_name
; a; U- w% c( m+ j9 `2 ?$ V( R0 P% U - GetDriverFunc=getSQLDriverMYSQL2 l- K& _5 k7 j+ F
- VendorLib=path_pointing_at_your_mysql_vendor_lib* h9 H' v' {( T9 ]
- LibraryName=path_to_libsqlmy_libary; y# ~3 T1 a) l
- Active=1
. ^3 U0 |+ z O" ] - ---cut here---
6 Y1 G4 q" j, Y' D/ `( J/ q - In my environment (a linux box with a MySQL server running locally) I have:
" E3 U% J# j* B4 b) r! G i" M/ X - ---example---
5 I8 n; \, J' r0 c% U8 h4 l - [DBEXPRESS]
6 B2 k: \$ I; R# T9 E, @! ?2 C' v - sqldir=mysql_sql
: \9 y* r% S& ~' x1 z* M6 I - Drivername=mysql' W' O. N' F6 m8 o* f
- Database=test3 l: L5 q9 d; C. \8 N, B* ?8 J
- Hostname=localhost* m3 R0 {& @! k
- User_name=testuser7 a$ ~5 \2 i2 w& W
- Password=my_password
& \6 j0 V! w! G3 a. A( ~. A/ ^+ H - GetDriverFunc=getSQLDriverMYSQL3 H% E2 X- @8 N3 I! \5 w
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 H3 O I& K0 f+ v* d% S
- LibraryName=./libsqlmy.so
- J9 V6 [; a2 [ - Active=13 Y( e) E, c. D; C3 M* Y. P
- ---example---
0 z& L+ e, {0 X - * M. Q' t- ?) W. |
- On a windows box, also running the MySQL server locally, it would be:
3 V' k" e+ c- s; ~0 z/ j - ---example---
4 o, L5 s9 Y* k( B - [DBEXPRESS]" R& C- k, T# g) l3 |" ?8 ~4 M. p
- sqldir=mysql_sql
# i' M0 V: [4 B& U- Y$ g0 ^' t - Drivername=mysql) K9 j$ \5 w* d. g" h" K& D2 U
- Database=test" h4 S# d: O. d7 o( C7 f
- Hostname=127.0.0.1
2 U/ m) r7 A! o$ y1 w - User_name=testuser+ ]5 I& v, u- S0 J& x
- Password=my_password
2 L8 X4 ~* y4 j5 u; V" M' U2 Y - GetDriverFunc=getSQLDriverMYSQL
& C* u! j" O V0 [7 }; z; l- t - VendorLib=libmysql.dll
/ s7 g6 m+ F @, A/ C" m0 U" G - LibraryName=dbexpmysql.dll+ D& B: w3 w: ~, ?
- Active=11 N" `3 R$ n3 p+ X/ b# Y
- ---example----
% R7 ]2 _. `* G ^1 a2 S - - written 02.03.04 by pwk.linuxfan: t) v% ?. i3 f& R: m9 C
# w& t9 k E$ f, ]0 E' C Q
复制代码 |
|