|
|
麻烦翻译一下,下面这段文章:xhan 5 d3 M* {/ o3 B) z( b6 v
6 @1 C/ t# c. v1 o% l
- 7 P% J5 C2 U0 L$ x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; t% h! V/ o: j
- D, W6 \4 ], o8 p4 R* S
- ### What we need ###
* C! }/ S% p% N# x - Naturally, we will need a MySQL server to store the data for us, this document
- [( M! J$ ]: r: ? - will not explain how this can be done - there are documents out there for the . b9 M# L/ l. J2 z* Y `
- interested. The requirements include a (empty) database for TeamSpeak to use6 W. @' A! b$ t* G- M
- and a user account (username + password) that has the permissions to do stuff* `; n- T o# a; g& n, E; s0 ]
- with the database. Additionally, you will need a vendor library installed on the
3 l8 {4 N, M8 Q7 @3 C - local machine, this came with my MySQL install.. ^! U. m+ t6 z A1 B; N
- These instructions will not tell you how you might transfer your data from the
8 ?1 p" h& M# m$ G5 _. A - SQLite database to the MySQL database, we start with a clean and empty MySQL" O2 c- X) `! Y
- database.
5 B* J& Y1 G0 u3 ]4 ^7 U - Some users have reported ways to import a SQLite database into MySQL, but at) W) `) C! O7 S& I
- the time of writing, there are still too many issues - check the current status) a4 F0 M- N. J! ~
- in the TeamSpeak forums if you are interested.! \* P0 a$ e8 J" U
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from! a2 b. n) x& n) J
- Borland was used. This driver can only interface with the client library that
( V" a v( S# a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 C0 ~. V3 K- L
- client library - basically all you have to do is to use a 3.x client library as + N7 H7 K7 J$ o% n
- "VendorLib" and a 4.x database to connect to.
, ^9 F; I; [% t3 h1 O - If you need more info about dbExpress, you can contact Borland.* _% \# G* Y" B9 Y* e, T3 H9 r/ a
: ^) F$ J7 \7 {+ m# m7 r3 {& o: h- ### Doing the work ###
+ B; C% [3 W/ l: P - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 u, H! Y% T) A" s - the perquisites right, just open your server.ini file, and add this section at- d# V$ H L+ I. y+ K! |9 H
- the end:) d0 H% T2 Y5 l% X# M; R1 Q
- ---cut here---" t4 |( Q& h8 `" P, C
- [DBEXPRESS]& g9 Y& t' H G- }% x* a: v
- sqldir=mysql_sql8 e6 Q; C7 C/ F2 p6 ?) K* q
- Drivername=mysql
7 I0 ?7 { D# v2 C - Database=Your_Database_Name_Here6 |: U+ O2 i# r5 t7 R, w
- Hostname=The_PC_the_MySQL-Server_is_on
( x2 R8 P* ]* K; c" |2 H' \ - User_name=User_name_on_the_MySQL-Server
! b8 _7 H4 D }9 j# e) ^: |# { - Password=Password_to_go_with_above_user_name
/ y9 H5 V$ R+ c2 r0 _# ]' O - GetDriverFunc=getSQLDriverMYSQL) A9 P' e* W: I9 L
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. c* L0 R2 Q! Y$ c# } - LibraryName=path_to_libsqlmy_libary
' s; v4 ^* \9 F5 ^ - Active=1
- H( M1 ~- @9 A5 e8 u2 p" r' G, M5 S - ---cut here---
6 b$ [+ c4 w( H" }, n- Z - In my environment (a linux box with a MySQL server running locally) I have:
1 u/ q, J" C1 W3 i* A - ---example---
{- J, x! l4 m' I8 l - [DBEXPRESS]
0 y, o% W, }1 U- ]4 o - sqldir=mysql_sql4 q- b, \7 U; Z" x9 b2 p, b! @4 g& v
- Drivername=mysql
- _4 ?# N0 `$ K$ q6 Y - Database=test/ O3 p$ S& }( t* x0 I
- Hostname=localhost
) B3 n" M! N9 x% }4 W - User_name=testuser
# r0 [+ s$ C( p7 S+ U+ x2 U - Password=my_password. c4 T7 [ ~, I
- GetDriverFunc=getSQLDriverMYSQL
o* c- [/ B& T+ d1 @ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 x& O0 I' ~1 I$ m( ?- m5 H
- LibraryName=./libsqlmy.so7 z- Y% u2 u: u3 G
- Active=1$ P/ @ J7 D6 @) h
- ---example---1 r' U) a! z8 ]) y. i3 b2 _
- - X2 g# i3 e5 j1 o- j& a
- On a windows box, also running the MySQL server locally, it would be:
$ R3 k- D; O) s, M" P. P - ---example---
- {' b. Y: T! ] - [DBEXPRESS]
) A, s* V3 r0 t6 M - sqldir=mysql_sql
+ E. W/ E' ]4 x. E$ D - Drivername=mysql
8 N: l3 M) m! X* f; F( [7 F - Database=test G& g1 u4 ~2 j: O5 Z
- Hostname=127.0.0.1
+ p; X, \$ m1 T- H6 ^- j1 k* d/ p - User_name=testuser5 R/ ^$ ^0 G' m0 P9 E# u
- Password=my_password
5 [/ g& o3 u9 { - GetDriverFunc=getSQLDriverMYSQL
- p* m! z% L, M6 [- X+ D+ V# O% t - VendorLib=libmysql.dll
! a2 ]( ?3 Y- x9 I5 p2 u; Y - LibraryName=dbexpmysql.dll. }% r2 ~0 w2 P7 [5 s; a
- Active=1) q/ g7 _' u6 Q" ]( Q* i- p0 r( t
- ---example----
1 l% r4 \& ^5 Q3 q5 X; D - - written 02.03.04 by pwk.linuxfan+ m8 r% k& _. e4 W6 p/ G
- n; x5 l D6 n s
复制代码 |
|