|
|
麻烦翻译一下,下面这段文章:xhan
2 ?7 W y6 A A$ k* d" @8 `( f
- # e$ \4 @6 {: S* f7 ?( U8 U
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######! ] C' l% V' L, Z* x
- - ?* D) i4 |3 V$ c
- ### What we need ###
0 K& r! a8 i& v6 L+ x$ b5 q$ b - Naturally, we will need a MySQL server to store the data for us, this document # P9 N& N+ G+ b; K2 S
- will not explain how this can be done - there are documents out there for the + R, \( q3 x: o0 l' _" @
- interested. The requirements include a (empty) database for TeamSpeak to use
) Z7 J t8 f. F - and a user account (username + password) that has the permissions to do stuff
' j+ z! |! r4 e* Y! a - with the database. Additionally, you will need a vendor library installed on the$ O6 ^. \2 k& |2 X- f, s, H
- local machine, this came with my MySQL install.( ~1 N8 g( k# o5 G+ u
- These instructions will not tell you how you might transfer your data from the
- J5 y( }: }$ Z( ` - SQLite database to the MySQL database, we start with a clean and empty MySQL
g1 ]+ z/ W, L- X - database.
- V6 f( \1 n" _ O7 D8 V - Some users have reported ways to import a SQLite database into MySQL, but at6 y2 y- ^( H" i; S# P" C. |4 S7 i
- the time of writing, there are still too many issues - check the current status( x: h8 n# X U1 D+ b
- in the TeamSpeak forums if you are interested. n2 m- e# _* l; d6 y9 s$ b s
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
! E j8 X$ z3 g - Borland was used. This driver can only interface with the client library that
% Z) }. l+ {; O; G - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 c& r2 k* _% K
- client library - basically all you have to do is to use a 3.x client library as
) C% |! C+ [3 `7 a5 o& D" a7 d - "VendorLib" and a 4.x database to connect to.# R" ]9 b+ ?, d- ]3 Y7 D6 ^
- If you need more info about dbExpress, you can contact Borland.
. H, H4 o1 S9 I) L - ' @$ c7 I4 i$ S# C4 W, Y6 E
- ### Doing the work ###9 `3 y! j) I1 B% P; [. A
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ s, E+ f: L ?* C) i: d; N
- the perquisites right, just open your server.ini file, and add this section at
2 |0 c5 m1 H' ?+ y6 j0 g& } - the end:, E# G" t7 ^6 V$ ?; V
- ---cut here---; d# I0 b! D7 v4 S0 d: u1 z9 Q: f
- [DBEXPRESS]
+ k7 j# L; u" b8 f1 t! R - sqldir=mysql_sql; X. `2 ?+ A1 p9 N
- Drivername=mysql Q7 o- ]8 U5 u+ n( J/ B
- Database=Your_Database_Name_Here& e$ d* Q/ g0 T6 D; A9 Q
- Hostname=The_PC_the_MySQL-Server_is_on& z6 T1 Z; k, N3 n; v' M# r
- User_name=User_name_on_the_MySQL-Server1 b" a- t% }* d8 ?7 d7 ~# ^* ]6 r
- Password=Password_to_go_with_above_user_name
2 T# k$ f0 T) `1 I+ Z4 `: N - GetDriverFunc=getSQLDriverMYSQL
\) A/ D. R# r6 d% [ - VendorLib=path_pointing_at_your_mysql_vendor_lib2 R* K* }8 z. J' `* F+ e1 H2 a0 s0 N
- LibraryName=path_to_libsqlmy_libary
5 |6 `6 t! K' d6 U9 | - Active=1
# P9 v$ ?9 X' \* E - ---cut here---) L( ]$ @& I1 ]5 _- }/ Q
- In my environment (a linux box with a MySQL server running locally) I have:
# c+ {! \* {: s& f - ---example---# [: Y0 c& ~6 o( G7 d& H) f
- [DBEXPRESS]9 o o" p' S5 k! C9 x
- sqldir=mysql_sql- B, k3 ~0 A3 x
- Drivername=mysql
& t1 O# }" R& l* Z8 |8 S - Database=test8 C) S" n- x6 J- | K% Z9 R m" }% `
- Hostname=localhost
# b4 [' a2 y" _ - User_name=testuser% f! f- R& A( i& Q* a' W
- Password=my_password4 k1 Y; r* S4 o9 m
- GetDriverFunc=getSQLDriverMYSQL9 F* P: i& A) v
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) {/ @7 V5 s4 c+ }
- LibraryName=./libsqlmy.so
3 c( N; w0 `) ^8 J/ f/ s/ K+ v! i i - Active=1
; R: n0 ~; A! c, ` - ---example---: e& E/ d }& `/ A5 {: u3 h
! i, h4 b$ K+ I- On a windows box, also running the MySQL server locally, it would be:* r% c* n. C) _# X% a
- ---example---
' |5 G1 X/ p9 k - [DBEXPRESS]
5 ~' ]1 c: W/ m [- c: D - sqldir=mysql_sql
0 o6 U. @4 N& @( O) l4 I+ ? - Drivername=mysql
" ~! Q1 F( j4 X+ L9 K6 K - Database=test- c9 n: A7 I9 x) q2 \# ~3 E
- Hostname=127.0.0.14 C1 q. f, V4 F
- User_name=testuser& F, t3 d; I, {5 m4 s
- Password=my_password( \' c d: K/ x% h
- GetDriverFunc=getSQLDriverMYSQL
: k& B% ~1 @4 F& O, k - VendorLib=libmysql.dll
% y0 N6 T! J! J( j - LibraryName=dbexpmysql.dll
+ V" K% ^4 [3 T4 E% E& t: | - Active=1
* G5 @8 S1 B: {# K - ---example----
7 b" ^6 H5 m2 V7 ` - - written 02.03.04 by pwk.linuxfan7 x0 j( R5 `7 o% E; A3 S6 x1 ~1 c! l
- 1 D* B0 B, W- c! B! b2 w3 ?0 j
复制代码 |
|