|
|
麻烦翻译一下,下面这段文章:xhan
2 F+ k& ~& n' h0 ?7 C& R3 L+ ?; ]/ y6 O
-
+ h1 h8 W1 z2 M3 H - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######' d6 ^8 j) c, ^
8 |1 ^: Z* r [- ### What we need ###
! w; e8 S0 e9 Q6 x/ u1 ]; ` - Naturally, we will need a MySQL server to store the data for us, this document
W! V" \" Y1 ^7 o5 h - will not explain how this can be done - there are documents out there for the
# Z% m1 e p$ r+ `/ ? - interested. The requirements include a (empty) database for TeamSpeak to use
, Z3 O- N5 K+ z2 \# x0 G! Y; F( j5 S - and a user account (username + password) that has the permissions to do stuff- I( q5 J- S; u ~) q5 n2 O
- with the database. Additionally, you will need a vendor library installed on the( l: w: a( M: P! c, W
- local machine, this came with my MySQL install.
: s( o0 ?- G% x0 M- j. ~4 O; a# s - These instructions will not tell you how you might transfer your data from the
* R6 F, N3 v# U; D2 G - SQLite database to the MySQL database, we start with a clean and empty MySQL
0 L, Z8 n, S) b5 k9 b! e4 D4 L - database. F' m0 U7 D5 s* J+ f/ J) p3 x' b4 p7 J
- Some users have reported ways to import a SQLite database into MySQL, but at
( O0 I! F) ^& o5 X/ ] - the time of writing, there are still too many issues - check the current status
! h/ _7 O3 a! y+ A7 D - in the TeamSpeak forums if you are interested.
& t6 h- }* P' u6 P - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( m M- }$ Z% {8 A - Borland was used. This driver can only interface with the client library that
1 B- Y+ W7 ^# C7 O - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: x% f' Q7 N. k - client library - basically all you have to do is to use a 3.x client library as
0 Q% x: G/ c9 _3 A, ~4 ]" @3 v - "VendorLib" and a 4.x database to connect to.
1 s$ D- r7 T( M M3 L - If you need more info about dbExpress, you can contact Borland.
" v' Y* @3 q3 H$ F7 a% O
0 { _0 ^$ ?1 p5 Y% J) Q3 f- ### Doing the work ###
" e# g! g1 {6 ?, ?! ~+ n - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
& R* f! B! }- ]5 H - the perquisites right, just open your server.ini file, and add this section at
7 }1 B6 G% M1 D; s) k* X6 r& [ - the end:4 j% C# n/ M, b9 P
- ---cut here---
! H) ]6 M8 H: d5 Q - [DBEXPRESS]
3 r5 F- g: h; Z6 V3 \ - sqldir=mysql_sql
! S4 ~/ Z! V) B" B, z4 s - Drivername=mysql) G. ~. f: C7 A
- Database=Your_Database_Name_Here
& _8 W3 x' `0 L0 J$ ^$ e - Hostname=The_PC_the_MySQL-Server_is_on
: W6 H6 [3 O2 b+ L - User_name=User_name_on_the_MySQL-Server
o- S7 s x6 s$ A: q# B( t - Password=Password_to_go_with_above_user_name
1 i; r& v6 Z% H9 ^ - GetDriverFunc=getSQLDriverMYSQL3 l3 n# M) q4 T$ _# @9 Z
- VendorLib=path_pointing_at_your_mysql_vendor_lib
2 X: o2 d- D, S1 \9 ^2 M: L - LibraryName=path_to_libsqlmy_libary
' U2 @+ j8 S2 C( R - Active=1
+ M2 |" I {* K3 ]3 ]) d! i; R - ---cut here---
. B! y$ H/ l5 e& `4 [ - In my environment (a linux box with a MySQL server running locally) I have:* g0 P4 @& b9 O+ q
- ---example---$ \4 V2 w" R1 C- p
- [DBEXPRESS]6 @% a+ ?8 p7 |( N
- sqldir=mysql_sql: M9 n. Z6 ~: n6 m
- Drivername=mysql$ X) X% Y/ C' r. H( I$ _
- Database=test
* D1 p! \. s* d L - Hostname=localhost
. V7 T! v* {' L' z/ @, [3 c - User_name=testuser
. Z$ x& B% g1 n2 `" j - Password=my_password
/ j% s% e% T: l, H# l - GetDriverFunc=getSQLDriverMYSQL
8 W- `# j! g/ Z2 g' S5 v3 r4 u" d& V - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! I4 V$ s" A/ e2 f
- LibraryName=./libsqlmy.so
, |4 o; d- M6 b - Active=1. c6 f/ O4 y$ h E9 e3 H, U
- ---example---/ G9 G: K( F6 J9 J I; A( X
- ' R# u7 A5 E$ _
- On a windows box, also running the MySQL server locally, it would be:/ r+ g! D: E" B' j; u* m% y$ ~
- ---example---# B' F; Z2 G- ?$ J$ S
- [DBEXPRESS]7 p* a+ V: Z! u+ q
- sqldir=mysql_sql, J. o( m$ P' T& A4 s* ]# {
- Drivername=mysql
" N5 N; L9 P) b; a7 M4 s! d - Database=test
5 b" o4 e, j+ P( m - Hostname=127.0.0.1
A# f1 \& a) Z5 K5 t - User_name=testuser
6 J- d {$ E4 m* Y1 f - Password=my_password
# @3 P- M4 K& Y& A - GetDriverFunc=getSQLDriverMYSQL1 a* e, z" }, o# [' {
- VendorLib=libmysql.dll
+ o# M: _. M8 `1 u% i. F: U - LibraryName=dbexpmysql.dll
5 h0 v; R$ T* F- @! _' w7 o - Active=1
* J% X2 K0 I% o' L7 g$ m - ---example----
" _: W/ V4 J8 l - - written 02.03.04 by pwk.linuxfan0 G; I0 o$ Q: [/ \
# ?. d! Y( x( q" v
复制代码 |
|