|
|
麻烦翻译一下,下面这段文章:xhan
8 U) [) n+ Z! V' f7 P5 [3 T; T( p r$ Z1 E. v; \2 |
- 1 P0 o, z1 G7 I8 i. A$ L8 y+ m5 c
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; [1 N9 m( ]9 P0 J - 7 D/ Q0 g# D7 e. S" K
- ### What we need ###' M6 ^4 o" Y* z6 i" _- w% {' F& X
- Naturally, we will need a MySQL server to store the data for us, this document ) ?) [+ J* c8 d0 `9 [/ U% x2 c
- will not explain how this can be done - there are documents out there for the ) L( R3 t; B" I6 c M
- interested. The requirements include a (empty) database for TeamSpeak to use3 Q( ]6 X+ M+ D$ F% o7 u& k ?
- and a user account (username + password) that has the permissions to do stuff9 Y' b3 r8 S1 M" z9 l# I# n& j
- with the database. Additionally, you will need a vendor library installed on the- {8 o. i' W1 N K' q
- local machine, this came with my MySQL install.+ N) @# X* b1 K U a
- These instructions will not tell you how you might transfer your data from the& Z ~' I9 m. R8 k2 C
- SQLite database to the MySQL database, we start with a clean and empty MySQL& M% @5 R! r" z7 j
- database.* ~, o5 C( Q5 \' `' M" H# Q
- Some users have reported ways to import a SQLite database into MySQL, but at9 |& t" x' C O( {$ n
- the time of writing, there are still too many issues - check the current status
9 r0 J( I, V( M# {) D - in the TeamSpeak forums if you are interested.
0 D2 `) A' Y1 S# O( o1 E - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- t+ {- k" t6 p - Borland was used. This driver can only interface with the client library that . N8 |; J, [+ C! H5 r) z2 \, h. W2 l- g
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
j. c5 Z; }+ k1 b8 ~ t1 ? - client library - basically all you have to do is to use a 3.x client library as
" S* g. g- T" D a: R# @ - "VendorLib" and a 4.x database to connect to.
0 ^- d/ C4 N8 G; H$ z( u% W6 a( H6 i - If you need more info about dbExpress, you can contact Borland.
: ~9 i5 ~* Q) u, {- R5 [
$ N$ u+ I) }9 @* C/ u# a2 o- ### Doing the work ###+ {" f7 `) e* A+ g+ m# ]: ~! Z; a0 }
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# k6 C" J; ]/ u - the perquisites right, just open your server.ini file, and add this section at; B: s# s* b$ h9 w- h
- the end:, Y0 G" X: I8 r
- ---cut here---. Y, Z1 c5 e6 |4 u) |
- [DBEXPRESS]
5 ` S+ v: p: F+ q; m - sqldir=mysql_sql
. O* F! Z: O; U# ?/ w# U( y - Drivername=mysql
, G) K1 C9 U/ _" G1 W" w - Database=Your_Database_Name_Here# v4 m- B6 |: M2 Q( P
- Hostname=The_PC_the_MySQL-Server_is_on
0 a' I. w; m: p) v. E8 b# w ^7 R - User_name=User_name_on_the_MySQL-Server: Q3 u/ I- j# |7 Z
- Password=Password_to_go_with_above_user_name
_3 c7 b( q: D - GetDriverFunc=getSQLDriverMYSQL4 l. C. R6 ?3 ?4 [ U6 E" |3 T' j4 @
- VendorLib=path_pointing_at_your_mysql_vendor_lib" e! b: } L- R0 z8 D+ u
- LibraryName=path_to_libsqlmy_libary
3 Y8 {) E q# i3 ]$ E! e/ \' K7 C - Active=1& J* i0 H- O6 _& n7 N9 ]& ?2 f
- ---cut here---
" _# f0 P2 @/ S1 G& o. b - In my environment (a linux box with a MySQL server running locally) I have:- s% G" w9 w$ w2 H# s; j
- ---example---4 j+ K) z* W( m& f9 o0 C
- [DBEXPRESS]
1 B$ {4 n& ^3 ?8 R; ` - sqldir=mysql_sql
9 Q+ K+ E; P' {0 R) t3 l2 |' c - Drivername=mysql+ e6 n% H( P# F$ u _/ a: C
- Database=test
9 z$ M" d# J6 H" e - Hostname=localhost) d O. }! b6 w: }# n
- User_name=testuser" ~* u2 ]" G- I; `( Q" C9 ?5 U
- Password=my_password0 _5 p; J' I- `* h( d5 z1 i& G; _! }
- GetDriverFunc=getSQLDriverMYSQL
1 K3 J, t. M% d7 c/ Z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- t: x' Z( ? U/ N) e* ?
- LibraryName=./libsqlmy.so
7 ^# K9 O& T! `/ O0 M - Active=1
V: v) t& V4 N9 ~ - ---example---4 V3 r) v- h' v7 b- t2 k
- 7 f/ L8 W& r T
- On a windows box, also running the MySQL server locally, it would be:
: G1 H2 n G5 R A' b - ---example---6 ], [5 o, X2 w; A/ T+ j5 C
- [DBEXPRESS]
# S. \$ u! e4 J3 E) M, E" d - sqldir=mysql_sql
& ]* G0 X7 s4 R4 Y - Drivername=mysql
$ ?, J" z$ t% \. K5 g9 D+ t; ?+ A - Database=test
- t# c8 |# [) \! V9 q7 L( o# ~ - Hostname=127.0.0.1
# A7 g8 W# e# ~* e0 Q - User_name=testuser
' q0 O G3 m; `& {; F& k$ a - Password=my_password
$ G9 n0 d6 A' D - GetDriverFunc=getSQLDriverMYSQL
7 x+ O3 q6 N7 s5 R/ C - VendorLib=libmysql.dll
9 Z0 t/ p5 Q+ h( N& I! c0 K - LibraryName=dbexpmysql.dll9 C* Q G8 i4 g: R# S& h" ]. {
- Active=1! C0 M1 t% ?: l( S1 f0 n- L
- ---example----4 f$ s$ e% n) X
- - written 02.03.04 by pwk.linuxfan
: K% E0 { C- L' t1 e - , ]% w c9 X+ K9 a5 s+ D X/ \5 n5 P
复制代码 |
|