|
|
麻烦翻译一下,下面这段文章:xhan / A& ^9 ], B& R
0 [( S: \8 s" l2 H+ R) S- , ]7 D% D( z _& O- s k9 e- \8 e
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 Y, N7 S; ~+ m* E$ P
3 A b# A' Q. U) H: H, D- ### What we need ###
. G6 w8 ^: E' G5 h7 F - Naturally, we will need a MySQL server to store the data for us, this document
. d$ q$ N" L0 c" J - will not explain how this can be done - there are documents out there for the 0 b* U z6 K1 E, s$ x/ ]
- interested. The requirements include a (empty) database for TeamSpeak to use
2 q- P( U; x1 A6 C4 d5 R$ C - and a user account (username + password) that has the permissions to do stuff
4 f3 o& G' e Z1 G% w( n - with the database. Additionally, you will need a vendor library installed on the% v' G) v" @0 S4 x: t9 L
- local machine, this came with my MySQL install.( t' q/ x1 j2 p0 P4 G: ]
- These instructions will not tell you how you might transfer your data from the3 Q# C& Y S6 c8 u) Q9 A
- SQLite database to the MySQL database, we start with a clean and empty MySQL u- x# i# G* R
- database.
; |; x9 s! b9 A i - Some users have reported ways to import a SQLite database into MySQL, but at. k( S8 I$ N: N& ~6 b
- the time of writing, there are still too many issues - check the current status
T$ ]4 g4 d7 ^- g5 {9 F - in the TeamSpeak forums if you are interested.8 q5 D. Z0 [$ z5 s, E; A
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ z1 g6 J+ g3 a! P. b7 i - Borland was used. This driver can only interface with the client library that ' U0 k" s+ z1 R
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; y" d+ v0 A; u4 a& i5 w
- client library - basically all you have to do is to use a 3.x client library as ' v9 i# H2 A; \# W: n( x
- "VendorLib" and a 4.x database to connect to.
" u- @+ j* v! u - If you need more info about dbExpress, you can contact Borland.
$ _0 t# j; N- t1 }+ P1 I! r0 x! h
4 g+ [/ H% B/ e6 Z- ### Doing the work ###- j- }0 g3 r2 B6 X0 n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ n, X/ Y1 j+ {* x4 M
- the perquisites right, just open your server.ini file, and add this section at
" X s2 m. ^* y - the end:0 S6 k4 X, @+ G
- ---cut here---
7 z5 S" p+ B9 W5 L2 C - [DBEXPRESS]( W1 [, z' ~/ E3 b6 O
- sqldir=mysql_sql
7 \; j$ V# V+ [2 r" @8 Z8 |+ _ - Drivername=mysql
- o1 X* R, f& c1 l - Database=Your_Database_Name_Here6 ~6 v) N& `7 k) ]1 t$ Y
- Hostname=The_PC_the_MySQL-Server_is_on$ V2 H$ X* w$ L* u0 ~
- User_name=User_name_on_the_MySQL-Server5 |" t9 T3 K Y! ^
- Password=Password_to_go_with_above_user_name+ R7 @6 s6 v1 Q
- GetDriverFunc=getSQLDriverMYSQL
' d Y" f9 H! p O) g - VendorLib=path_pointing_at_your_mysql_vendor_lib
* n8 _0 [, b, y3 b& g - LibraryName=path_to_libsqlmy_libary3 C; i/ p8 N4 E3 }/ W. c9 G
- Active=1
; r; h% Y X! [ P' ~: Z F a - ---cut here---
6 k6 J2 J% h- ~ @ - In my environment (a linux box with a MySQL server running locally) I have:
/ R6 {/ x7 Y3 e, X4 M, t - ---example---
" x2 B* h- A& v v! j( R - [DBEXPRESS]
2 I$ ?% [; k% T9 o7 i - sqldir=mysql_sql
' r8 Y3 m0 x2 D: L( o) o - Drivername=mysql
@. [( n' j6 A/ Y - Database=test
( y4 q3 I& Y3 H3 @) _+ s* M1 K" s - Hostname=localhost
9 R Y( G( b; t$ v5 v - User_name=testuser( ]% K3 H, @5 f* K% ]* y+ f
- Password=my_password# E3 b! t1 X: I& x
- GetDriverFunc=getSQLDriverMYSQL' e7 q4 x @# u! b! E/ N" a' @" J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& W, W0 }4 J$ p) h7 r0 ^
- LibraryName=./libsqlmy.so" f8 e; z2 z' w0 C
- Active=1- G1 E% x# @; D, p6 R- I, s: I
- ---example---
" }, _% F- d' o5 R* O0 G# m' @
& Q1 [- ~4 j$ a& M. I* v. B- On a windows box, also running the MySQL server locally, it would be:
: d! b$ @+ f" F( T+ L- X - ---example---" z, K4 @1 C t
- [DBEXPRESS]
$ _; m+ S. |5 u! A - sqldir=mysql_sql
! o. y3 l, k( m) A. o+ V$ R2 Q - Drivername=mysql
6 l$ {& Z' x6 k% M m; |$ z - Database=test
K. ^: I+ i) ]: e' R - Hostname=127.0.0.1
' G9 t) o& S# _ - User_name=testuser
% C0 \0 G- t, \5 w - Password=my_password3 s7 |, L1 R, M
- GetDriverFunc=getSQLDriverMYSQL* Z- g: }( {8 @! L
- VendorLib=libmysql.dll
4 i) I' Q$ H& `8 a - LibraryName=dbexpmysql.dll! [3 ?5 [4 H5 m& }. o% m- d
- Active=1& Y( I) Q2 K0 M% ^7 U; z
- ---example----/ s2 a$ w9 O5 Q" S9 v
- - written 02.03.04 by pwk.linuxfan
+ ^+ ^: ^; s, r) u - - q* x: M) z; d# ?/ v: E. F
复制代码 |
|