|
|
麻烦翻译一下,下面这段文章:xhan ) b" H* S& s4 N' o: \' {% q
6 Y/ Y/ T' t: Y5 `5 p4 y( a2 o-
) T( }) o/ ~, z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) ]9 y9 O7 G9 Y% z+ S/ Z' y; `& m6 E0 L
- l; i, w2 M" V# I$ o- ### What we need ###/ K4 w8 j4 S2 X7 y7 O# g
- Naturally, we will need a MySQL server to store the data for us, this document
) R/ \7 ^! m6 J - will not explain how this can be done - there are documents out there for the
" @( _. Z; m- t8 y - interested. The requirements include a (empty) database for TeamSpeak to use
9 x9 f: y6 U, |" m0 } - and a user account (username + password) that has the permissions to do stuff8 u- m3 q' r4 ^4 r2 O+ K
- with the database. Additionally, you will need a vendor library installed on the% U) b: Q2 H e; Z- B
- local machine, this came with my MySQL install.- f2 u! y- K5 ~* _, `* g' l
- These instructions will not tell you how you might transfer your data from the( r B& }. z1 ^7 e% p/ j
- SQLite database to the MySQL database, we start with a clean and empty MySQL J+ S+ F6 T- @2 M4 m/ T
- database.
: K' ~, x- b- F9 s2 ?9 L - Some users have reported ways to import a SQLite database into MySQL, but at5 o' Y8 [. ^7 u( ?* O, {- }' h+ h
- the time of writing, there are still too many issues - check the current status
; h3 S2 i7 [" d - in the TeamSpeak forums if you are interested.7 i2 m3 f; N5 K. c
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from" G9 }& h3 {7 D
- Borland was used. This driver can only interface with the client library that
& p* J* J+ ^6 N% E - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' g% W% {$ K: c - client library - basically all you have to do is to use a 3.x client library as
* k5 w4 s3 L! g9 _9 p - "VendorLib" and a 4.x database to connect to.8 k- P$ Y3 ]6 p, |8 Y5 _6 e' `
- If you need more info about dbExpress, you can contact Borland.4 P. B/ y) a; i2 E+ _9 _# ~8 V1 I
H1 _+ p! P, J; z- ### Doing the work ###8 ^% r" d r; k9 a# j) S) l$ T* ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; w. J# T) y) B- a# ^8 D: i8 ^
- the perquisites right, just open your server.ini file, and add this section at
6 T8 S: |: K4 b, X3 S; k5 @ - the end:
7 _5 v3 I' D. @. \7 r) `" m( G, w - ---cut here---
8 ?' e, y7 ~" f. |( G& {$ C - [DBEXPRESS]4 M. G* A6 o$ G" W: z2 g3 {. ^- H
- sqldir=mysql_sql, ?4 G% u% i" K+ _
- Drivername=mysql4 P: V/ H- X4 S( _
- Database=Your_Database_Name_Here
r' N9 @+ E& I& Q* y4 ^5 A - Hostname=The_PC_the_MySQL-Server_is_on. M; z1 l( a) N0 @" H4 _7 J( b
- User_name=User_name_on_the_MySQL-Server
9 {/ O& n6 p Q# J& H) I - Password=Password_to_go_with_above_user_name1 o/ F$ T. n! r% D8 I
- GetDriverFunc=getSQLDriverMYSQL; M2 b; u* l2 L% w5 G+ v- P
- VendorLib=path_pointing_at_your_mysql_vendor_lib
( A7 v- T0 w k9 p" P( E9 h - LibraryName=path_to_libsqlmy_libary* t7 a$ J2 y# T% P; ]
- Active=1
* g% d7 M1 y f7 g7 T - ---cut here---
- ~8 ^4 C K/ {) ^6 ~ - In my environment (a linux box with a MySQL server running locally) I have:
+ ^+ I+ J$ x- ~! P - ---example---
" K: x! I$ E3 f) N - [DBEXPRESS]
/ v# A2 s6 L+ C - sqldir=mysql_sql" [- r, i; a& W, u) L' ~
- Drivername=mysql
# }8 p0 L5 d9 G - Database=test
3 m; ?' B# t6 x7 X& z' E - Hostname=localhost) X; Q3 B$ C$ P3 R# b% v( e
- User_name=testuser- E: f" c2 ?( r6 x5 _9 }( {
- Password=my_password/ x' O c: {! X7 b/ O1 c( \
- GetDriverFunc=getSQLDriverMYSQL
7 P( u2 E0 {! E/ O - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& l$ N. e& d5 Y1 N
- LibraryName=./libsqlmy.so( z. r$ u7 W8 @9 I* j+ ]; {* |* g) a
- Active=12 N2 o( {3 I1 C( r. j& M; L
- ---example---
1 R& X/ ], Q3 q5 g: }# D - 8 U' E4 e, O) R6 B% F) H! Y
- On a windows box, also running the MySQL server locally, it would be:
% i( J# t; t4 @5 e, R s - ---example---
/ m( ]4 C6 T! S. h# \, _& c - [DBEXPRESS]
! r5 K2 E. A" s# y1 t - sqldir=mysql_sql. z9 V9 ]: G0 c5 w& j4 }1 |
- Drivername=mysql
1 L# `' g- M% m2 n: E - Database=test+ M* x4 c( z- ^
- Hostname=127.0.0.10 ^! c; Y( V: {; v3 g$ i
- User_name=testuser
; b2 W. a) I$ H1 i( I+ O8 }4 | - Password=my_password
8 P' H( P, ~; N2 V3 B - GetDriverFunc=getSQLDriverMYSQL2 ^* e) a v1 _- I( H9 k9 C: j3 z
- VendorLib=libmysql.dll
% c5 E8 ^; Q0 _- J - LibraryName=dbexpmysql.dll+ X# U0 A1 Z( t; E$ M' D
- Active=19 g+ X& j& x( j$ [
- ---example----
" U g- u' z0 z# P6 m - - written 02.03.04 by pwk.linuxfan9 \. X8 M8 |8 ]
- $ ]! T! V$ y% b
复制代码 |
|