|
|
麻烦翻译一下,下面这段文章:xhan
8 v; G8 K# l1 t1 \+ l
5 A- F/ L: \3 n; V( o1 m/ T8 ]-
/ }9 d" U! T; \' ^* O" r/ ]3 ]0 _6 c - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
2 j6 |2 q: B! Y5 m! C - $ S" c3 u3 H7 J, H
- ### What we need ###
u% O/ E4 A" b6 y - Naturally, we will need a MySQL server to store the data for us, this document
, Q4 z5 V( {, X9 N" n% c - will not explain how this can be done - there are documents out there for the 1 r0 \; K( x( K. p' l: u
- interested. The requirements include a (empty) database for TeamSpeak to use
5 Y: @8 _) n) a) X - and a user account (username + password) that has the permissions to do stuff9 t# ]6 D/ {7 Y/ l
- with the database. Additionally, you will need a vendor library installed on the/ L. g9 f) Z# D, G/ ~+ k
- local machine, this came with my MySQL install.* Y' R" ~* j6 q G0 o
- These instructions will not tell you how you might transfer your data from the0 z% x; u$ C' a2 T
- SQLite database to the MySQL database, we start with a clean and empty MySQL2 F& n' `- _0 \7 O( _8 D0 R
- database.
1 q+ m/ ~4 @% p3 |8 a! @, D - Some users have reported ways to import a SQLite database into MySQL, but at
' s' d7 G( I9 }8 ^7 N! p - the time of writing, there are still too many issues - check the current status
6 i3 L; u# ^: @; z( l+ c r6 z - in the TeamSpeak forums if you are interested.
+ l0 F. Q: [" l: J5 I" [ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
! r; p. c8 i5 B* E- M4 j - Borland was used. This driver can only interface with the client library that ( Q" ?2 v0 I" w5 |% Y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 h1 @" p) s! v7 u9 y( P - client library - basically all you have to do is to use a 3.x client library as
2 Q! \( i, K" O; V' l4 x - "VendorLib" and a 4.x database to connect to., [. F2 J0 G# @5 s8 m% m. s
- If you need more info about dbExpress, you can contact Borland.
, L- n% V$ ~/ r* u; n+ |0 { - " ?! |# M9 K' p$ z _
- ### Doing the work ###( c& a C" B n6 r
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 ?4 U' z* g- S( X0 Y( P: \# [2 d - the perquisites right, just open your server.ini file, and add this section at' J9 Q) x; k) d1 b5 \9 S: L
- the end:6 C4 q m2 E9 v1 P, V
- ---cut here---
+ ^8 G: \: p2 b- U - [DBEXPRESS]- b" `- w2 w- K9 R) H! E# \' U
- sqldir=mysql_sql3 w3 `3 } K4 D$ ^+ E
- Drivername=mysql- v% i* Y) o/ m
- Database=Your_Database_Name_Here
5 H, ? S% Y' T$ J# w/ | - Hostname=The_PC_the_MySQL-Server_is_on
l" n4 s1 Z3 G9 c' P3 t% V6 X - User_name=User_name_on_the_MySQL-Server" P$ F* Q1 ~4 _4 n
- Password=Password_to_go_with_above_user_name
' y; P! H) U. C; P0 S) y/ G( U* C( M - GetDriverFunc=getSQLDriverMYSQL
! H9 G3 t1 H" k - VendorLib=path_pointing_at_your_mysql_vendor_lib0 Q" T/ S- V) l9 d+ r3 d
- LibraryName=path_to_libsqlmy_libary' s4 {' g0 ?; j; D
- Active=1; R7 Q' T5 W; q
- ---cut here---
" r# S- A" s, B; ~ - In my environment (a linux box with a MySQL server running locally) I have:
% u7 e* E. k: E) K& H - ---example---
9 Y. B* n" a n4 | - [DBEXPRESS]( R) l2 l) N- a
- sqldir=mysql_sql
, v* Z0 C$ Z1 e$ M9 J% H! \ - Drivername=mysql
+ ?- {; A$ q8 h* i5 H - Database=test
2 N9 D0 v) _7 {8 {& W o3 b$ |7 o - Hostname=localhost
& b* }$ x N! n3 v { - User_name=testuser5 @5 x* q, c: _
- Password=my_password
1 T( U- d D% ]+ G% A& ] - GetDriverFunc=getSQLDriverMYSQL
- p* I. Y+ _4 ?: k1 z. M. Y D - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: R w# \1 \3 S9 m4 G) }- l+ N, P( } - LibraryName=./libsqlmy.so
% ^5 w& k# U6 @) R/ s - Active=11 X# o7 ]0 z2 i- j1 D
- ---example---
4 h. H* Z% V/ i
0 x+ x' n9 d2 h* M- On a windows box, also running the MySQL server locally, it would be:
( v/ K% T: k6 _# ? - ---example---
+ B5 l# ?9 D" m/ n - [DBEXPRESS]* y3 F$ E! {; F5 R; m
- sqldir=mysql_sql
2 N! ?' V7 X5 J - Drivername=mysql
: V0 N# ^' O, l4 | - Database=test
# |7 }; n2 y* p$ a% ] - Hostname=127.0.0.1) j: m9 q m0 d7 X
- User_name=testuser# {6 E6 c+ m& w. {4 V8 _0 k4 @
- Password=my_password% M! q/ {) U' K
- GetDriverFunc=getSQLDriverMYSQL4 ~5 h1 Q5 L- A9 F
- VendorLib=libmysql.dll
n3 R5 H9 R0 S8 L" T( Y' W4 B- j) b - LibraryName=dbexpmysql.dll
9 a3 a- g$ @5 K! O - Active=12 v8 k! S- @: f, K7 q
- ---example----0 x# O& ~, e/ @0 K: _7 F
- - written 02.03.04 by pwk.linuxfan
& h" i5 C. d, S5 D1 z! z" I
* s; p# H2 W) q) K, d2 Q5 ~2 Q
复制代码 |
|