|
|
麻烦翻译一下,下面这段文章:xhan
& R7 X: A/ ]% V' y$ d5 Z \ a9 c, r* ]" t4 k
-
/ O* p! k; c+ s0 c% u - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, t- G& t6 P5 e9 A O6 N. O - " m$ {0 J7 m* O0 N
- ### What we need ###
9 H [$ j. |( N+ Z6 k+ p, U - Naturally, we will need a MySQL server to store the data for us, this document $ E9 ^' R4 C. s: o& S; q, t/ B7 l
- will not explain how this can be done - there are documents out there for the ) f& _# Y" ?% u
- interested. The requirements include a (empty) database for TeamSpeak to use
6 d( F8 q% o% m: @ - and a user account (username + password) that has the permissions to do stuff3 n/ R0 D9 t l; ], ^" U A
- with the database. Additionally, you will need a vendor library installed on the
7 i# F3 o* t& R/ A - local machine, this came with my MySQL install.4 S# P# z' X% [) ]5 |) c
- These instructions will not tell you how you might transfer your data from the) L+ S) H; g/ X$ C$ L1 t
- SQLite database to the MySQL database, we start with a clean and empty MySQL5 S1 y' O0 y% F' T, K
- database.1 S+ J# {1 v# @
- Some users have reported ways to import a SQLite database into MySQL, but at V7 {- E. X- f6 w8 }. ^, T- V& ]& D
- the time of writing, there are still too many issues - check the current status; _& n; N9 L% p6 d% m7 D8 r* Z
- in the TeamSpeak forums if you are interested.( ~) `3 m S& }. V$ _
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% L( D5 E* c1 G. ?- ?
- Borland was used. This driver can only interface with the client library that " `$ y6 N8 N" e# u* {6 R$ b h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% k" m0 q( t( b9 d) R$ ~ - client library - basically all you have to do is to use a 3.x client library as
6 e" v9 A$ v7 f; h5 n% } - "VendorLib" and a 4.x database to connect to.
7 B6 C8 O- q3 D% X; C+ v - If you need more info about dbExpress, you can contact Borland.
+ {3 v j* H5 K - ' e: J' Y+ \6 A3 C7 n0 h4 Z
- ### Doing the work ###: B* D% q% f2 r3 z& q
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 K; E, j' V% v3 M! u. U5 O
- the perquisites right, just open your server.ini file, and add this section at
) m" P7 ?4 c$ x3 O; | - the end:* D4 e7 P$ X1 b( I J! f
- ---cut here---
' c' n# D" v8 I; H9 X - [DBEXPRESS]6 R6 h! [" F# V
- sqldir=mysql_sql8 h, p; I1 I/ S) r I
- Drivername=mysql
# K" H" s" Z k: f* ] x - Database=Your_Database_Name_Here
$ ?# G; e8 D4 a( @% z% a4 P+ Q6 Z- ^" e - Hostname=The_PC_the_MySQL-Server_is_on8 c) w2 Q6 E; T% A7 g: H
- User_name=User_name_on_the_MySQL-Server
8 s( @: k8 N5 m) d2 ~ - Password=Password_to_go_with_above_user_name
1 ]5 {" |2 V# D - GetDriverFunc=getSQLDriverMYSQL$ U9 @! l) o* W: _: `3 I! x
- VendorLib=path_pointing_at_your_mysql_vendor_lib
! k0 c& W, g( Z, [/ F4 n - LibraryName=path_to_libsqlmy_libary/ y2 b" V4 a: f) ?2 }
- Active=1+ n' |* S% k# W
- ---cut here---
% t* @! h' \ k" f- d - In my environment (a linux box with a MySQL server running locally) I have:
1 b2 P0 m0 _) @2 y+ X - ---example---) l8 O6 G7 x3 Y+ s' a* J9 n& [! \
- [DBEXPRESS]
# J+ y# t# L P# Q; P# h - sqldir=mysql_sql
7 V& u$ k3 y, j( U - Drivername=mysql
! n4 i) o" r5 G' E* ]0 f - Database=test" l+ I: E# m) ]! P4 I
- Hostname=localhost
* D4 R- c4 V V4 ~( p5 b; |5 o - User_name=testuser+ h2 c4 D( ]! W6 h( a! |
- Password=my_password5 ]; D3 C9 e" e
- GetDriverFunc=getSQLDriverMYSQL
$ \! P3 w: \5 {2 ~/ P2 U - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
# S" U) {! x1 `9 \% E# j - LibraryName=./libsqlmy.so( C( a# }9 m0 p9 u' b
- Active=1' {4 n- R5 V1 @+ V" p
- ---example---2 ^1 p' @) V$ S% A/ [; x8 m5 l7 y
8 V; R5 ^5 B1 i& i! ~* F- On a windows box, also running the MySQL server locally, it would be:
5 S' U3 Z9 K( ]) {- w - ---example---
' @7 Z2 j9 ?0 w2 I5 Q4 N - [DBEXPRESS]7 U2 V3 B5 I# c% u' y$ b- Z- H
- sqldir=mysql_sql
0 `+ p0 D I- z% Z+ G B' V; Z% \ - Drivername=mysql
4 N& m# ~$ i& e" C - Database=test
7 K* ~8 O& R" ?' g* E - Hostname=127.0.0.1% ]6 l9 W0 D( I4 c5 j. ?! j
- User_name=testuser& D* M4 n) a) d
- Password=my_password
- `& R, G9 c' F- Z - GetDriverFunc=getSQLDriverMYSQL
7 l2 b% }5 H! i. a0 h4 w( @) C" u9 [# J - VendorLib=libmysql.dll
, Y) A' c; t3 E* I9 N* ]! m - LibraryName=dbexpmysql.dll" E0 D& s" k1 k7 Y8 j
- Active=1+ \ i; a6 F$ E" z6 F5 b
- ---example----
( r$ w1 C" G' e - - written 02.03.04 by pwk.linuxfan$ p0 g7 c* D/ ]/ M# x; B
" i y, e1 X% R. D7 R N
复制代码 |
|