|
|
麻烦翻译一下,下面这段文章:xhan # s! T1 L2 K) p* `
: I7 |8 C- o' h; J4 `2 j- $ ^' g3 B. ]* z" `0 [, \
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
1 @' q9 h: @3 G+ e; @ ?& l
. ]8 G/ G0 g( ]% M$ w- ### What we need ###
/ s6 a5 Q- ^# E8 h - Naturally, we will need a MySQL server to store the data for us, this document
- r4 C% ?3 V; z7 X8 H - will not explain how this can be done - there are documents out there for the " J: c* v: t9 P1 d
- interested. The requirements include a (empty) database for TeamSpeak to use( A4 u0 U8 x7 @3 S0 q2 I2 _, n
- and a user account (username + password) that has the permissions to do stuff$ S) `, w- m- a" G
- with the database. Additionally, you will need a vendor library installed on the
) u* [1 C) ?- {$ F - local machine, this came with my MySQL install.
( [0 a/ P' z. {$ M { - These instructions will not tell you how you might transfer your data from the& H7 g* g0 E9 n ~6 f' L$ c, d
- SQLite database to the MySQL database, we start with a clean and empty MySQL
' O; {! q! j9 h+ @9 n1 i" K" a$ a - database.
% p2 B$ V, U+ |# j - Some users have reported ways to import a SQLite database into MySQL, but at
- T( ]! L+ E5 N; \& D0 @3 y - the time of writing, there are still too many issues - check the current status5 R" @2 Q/ l% g
- in the TeamSpeak forums if you are interested.
) c2 j R7 }) m - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- t5 G8 u6 m3 F$ j8 W. ^5 `' B - Borland was used. This driver can only interface with the client library that " T" W W" V1 ]# \# L6 `6 _) j
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
" p, p$ F( v( h: |" I - client library - basically all you have to do is to use a 3.x client library as
9 N* b; ^4 |3 N# o - "VendorLib" and a 4.x database to connect to.4 K+ w0 T) p2 o0 p; c
- If you need more info about dbExpress, you can contact Borland." }9 n$ L3 P j2 J( o
7 M* \3 {6 n9 [- ### Doing the work ###* R. A# ^& [0 x# N4 m4 O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all4 u3 o, k V; {
- the perquisites right, just open your server.ini file, and add this section at' G6 ]8 K/ d1 w6 u% g; r8 `
- the end:& X1 s+ n5 ?$ k5 g% N
- ---cut here---( G/ p) V. g+ W# e+ w) P( A1 _
- [DBEXPRESS]5 K1 I3 G( k. C. x, l5 b
- sqldir=mysql_sql- G5 @, _+ P4 a6 H+ E3 `9 b
- Drivername=mysql
& O2 |6 Y( }0 G. E G8 j3 I - Database=Your_Database_Name_Here, p. g7 ~# F/ w0 V; k
- Hostname=The_PC_the_MySQL-Server_is_on6 R7 {) z, ~5 G, [8 T6 H2 T
- User_name=User_name_on_the_MySQL-Server
# F) K9 I/ }1 b5 E5 d - Password=Password_to_go_with_above_user_name
6 ~* v* z) o+ u) g+ t9 K. r* z - GetDriverFunc=getSQLDriverMYSQL& E! ^( [) Q- z5 w$ E. O4 [
- VendorLib=path_pointing_at_your_mysql_vendor_lib9 f& }/ a0 l+ @- Q- p$ f
- LibraryName=path_to_libsqlmy_libary1 W2 D1 d* J$ ~9 B# j5 A) \
- Active=1& Y6 c* \: M" b0 d7 ^* L
- ---cut here---
5 x9 N4 W9 U8 n( I8 j - In my environment (a linux box with a MySQL server running locally) I have:; G6 @+ J3 b' D6 R+ C
- ---example---: v9 A( o( F. K. b
- [DBEXPRESS]
) j) [, C8 {- [( V* v* z: L - sqldir=mysql_sql
# r# H- K1 n+ N p) H$ m3 p - Drivername=mysql
5 w0 O# z0 p; W8 x: m$ H - Database=test
/ B; \$ o0 ~6 \* L' S2 F - Hostname=localhost
. _; I* u. }1 P$ b; A% L- _ - User_name=testuser* z) }: s/ E S% C1 j
- Password=my_password& P# @9 f2 U( B7 @9 M9 b
- GetDriverFunc=getSQLDriverMYSQL, \ p- l! \2 V, g
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 q* @* X" c* f3 U8 m! C6 N' C
- LibraryName=./libsqlmy.so
: J' c' J# w# e3 ^( K% O. U! g - Active=1* F8 m$ M/ S5 e* c" [( m' c G
- ---example---& q# l) O% Q) i2 F& H0 b' ^
/ T, W' g; P# @+ g7 ^' C- On a windows box, also running the MySQL server locally, it would be:5 w& ~8 b3 D- h G2 h& \% C& o+ {* T
- ---example---
+ l5 M6 [' H, K; l - [DBEXPRESS]7 u- ]/ V9 \/ w
- sqldir=mysql_sql
; X) x6 c/ Y* f; f4 o( m - Drivername=mysql
! a0 p1 j+ B+ O! n8 t - Database=test& x( ?- O5 Q3 u
- Hostname=127.0.0.1/ Z3 [. c2 S4 C: V
- User_name=testuser! F! [ p+ I' l% @
- Password=my_password; ?( T+ T0 W: S# o5 Y
- GetDriverFunc=getSQLDriverMYSQL" m8 n/ e0 a7 N
- VendorLib=libmysql.dll
7 G# T2 r* \3 Z9 J - LibraryName=dbexpmysql.dll: s# P( e; ]9 R/ v! k
- Active=1
0 ]6 X" v- G c - ---example---- Z, e# i' S4 G* L
- - written 02.03.04 by pwk.linuxfan# J% y3 `) ^2 u" Z' o9 Z8 c
- 0 T+ ]% K' z2 y9 q ]( h
复制代码 |
|