|
|
麻烦翻译一下,下面这段文章:xhan
( S1 r5 M ~ n2 F; w# k7 K7 U- f: M9 ~* c0 `& ? n ~
- $ y: M" i. S! N D0 z% J
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 D! B6 ~1 M3 | J
+ `& T8 {7 ]8 e. }1 L/ J- ### What we need ###
% ?* g, e% M/ r5 E+ i: r& J2 x& ] - Naturally, we will need a MySQL server to store the data for us, this document
' K0 e* `( G( l( y7 p - will not explain how this can be done - there are documents out there for the ' d" B# X: A* y; I1 B0 [% O3 s# A" _
- interested. The requirements include a (empty) database for TeamSpeak to use
2 w% }8 _3 C0 I& d - and a user account (username + password) that has the permissions to do stuff7 O) s" ] g, y: I
- with the database. Additionally, you will need a vendor library installed on the/ u; v7 F* t' F3 y; ]$ ]
- local machine, this came with my MySQL install.) |2 n7 ~: ]% y. d6 U4 b
- These instructions will not tell you how you might transfer your data from the% K9 \ l' C" H1 Z" M
- SQLite database to the MySQL database, we start with a clean and empty MySQL
& c' w; h2 N. X0 [+ w - database.
2 g0 ~7 ^0 _" p1 M: [% Q1 d! R W - Some users have reported ways to import a SQLite database into MySQL, but at
w8 s: D" X; g8 I. Y- P! ^$ u* [) N# A - the time of writing, there are still too many issues - check the current status
7 b$ d; ?( x( x; K1 B! n6 z1 X9 H - in the TeamSpeak forums if you are interested.6 [% w8 `& c) t7 H% b) C
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" z8 A( G4 r% a - Borland was used. This driver can only interface with the client library that
6 l+ c1 x: S7 ?4 }/ U* r( } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! _# x9 ~6 M2 E0 L
- client library - basically all you have to do is to use a 3.x client library as
- U! L9 g: J2 Z# _. d* j/ ]9 u3 U - "VendorLib" and a 4.x database to connect to.
" w3 e" V4 I5 _" ^4 f" O - If you need more info about dbExpress, you can contact Borland.% J3 q% p) T: D! A5 N0 [; {# \
- 4 A% i. U% L# a, }6 P0 ]
- ### Doing the work ###
7 g" d D: J& S. h4 z- e2 N. m - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 p, C( [0 m$ q I: E
- the perquisites right, just open your server.ini file, and add this section at
I6 j6 L* |% S# a( X - the end:
( x& L9 w. U, ]( g1 e - ---cut here---4 [8 O: _- N6 Z# M: ]7 c
- [DBEXPRESS]
$ w9 x* \3 m9 q: W - sqldir=mysql_sql
2 X# p% }4 x, h- B* a - Drivername=mysql
' H6 K8 t/ R, ^2 v; O o( P# M" p - Database=Your_Database_Name_Here
% g& J2 g# {* b9 F+ X& m - Hostname=The_PC_the_MySQL-Server_is_on, k$ C: y2 W, M% {6 R& w% q
- User_name=User_name_on_the_MySQL-Server( b" Y" @1 ]. | v
- Password=Password_to_go_with_above_user_name
) e+ Q V, j6 f8 ^1 \# e3 k6 e8 ?, U - GetDriverFunc=getSQLDriverMYSQL
6 E; ?- |: m8 J8 |7 u. z - VendorLib=path_pointing_at_your_mysql_vendor_lib
( b( |! a/ u5 _3 x# c4 J - LibraryName=path_to_libsqlmy_libary. I2 V% \' ~, {% n) h5 q( x
- Active=1
; ^! ]7 y0 N. Q( e! ]) w# d/ X - ---cut here---, ~% ^' ~+ X9 i/ J4 M/ ~7 f1 Q o
- In my environment (a linux box with a MySQL server running locally) I have:9 Q# K5 f3 N4 e
- ---example---
+ [( D6 h! H; F - [DBEXPRESS]/ j& ^, F; D3 s0 s/ `1 `( h4 U
- sqldir=mysql_sql
1 @" t) R$ I" ? ?2 ^* C - Drivername=mysql$ o/ t8 I& q$ A6 Y3 o" O# q% H/ D
- Database=test- F, f, S1 A1 M2 H0 \. O1 V' B
- Hostname=localhost
& {1 d1 `4 o- |, j+ X* q - User_name=testuser
* `, [2 r$ Y$ ] - Password=my_password2 {' L4 z/ W+ v3 b4 c) j
- GetDriverFunc=getSQLDriverMYSQL3 X7 V+ y8 v8 h" n }& s# u. a% g
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* L( Q w, Z3 s' T - LibraryName=./libsqlmy.so
& A; L ~8 f/ ~' r - Active=18 N9 [+ \) _1 m, ?+ r; E% V
- ---example---
+ ^$ m" L8 l- v$ u9 Y# t0 ^
: y9 V+ S7 @+ u1 ^, }+ |: ~! ^- On a windows box, also running the MySQL server locally, it would be:1 {) N4 |3 M6 T" B- s
- ---example---* {6 U4 G3 R$ O1 h
- [DBEXPRESS]
, B- h8 r& ?+ V1 x! q2 F - sqldir=mysql_sql
# v( ~% h; W& N% U! H2 n; P - Drivername=mysql H. l0 F6 T9 }3 M
- Database=test/ t! E) K7 b; Q l- F
- Hostname=127.0.0.1( h7 f+ U; Q' o1 {/ h# ]/ Y3 J' ~
- User_name=testuser
& h6 {9 Y8 o% j* c - Password=my_password; W2 h0 K' K' r
- GetDriverFunc=getSQLDriverMYSQL
7 y T: J- l4 I _: P - VendorLib=libmysql.dll( T$ I5 G) o( A+ l3 H/ r
- LibraryName=dbexpmysql.dll
/ [# f% ]2 T1 J2 K$ N) ]9 ^ - Active=1
" M0 z) O1 W: }; M - ---example----
~. B3 e: A- v: R - - written 02.03.04 by pwk.linuxfan' t4 | Y7 i. L. k( o0 T' q
- 9 _. G/ M+ S8 U$ I' z" B
复制代码 |
|