|
|
麻烦翻译一下,下面这段文章:xhan 4 M( A; A; J3 |4 K
5 q2 `" J* z! j- 4 V; Y# @9 O* W1 @1 z x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 b* v j0 U! u' i' B+ N' R" V7 q
- . \9 j( B: h' h' E) F8 C; x
- ### What we need ###9 l/ D% a# {7 B5 E. ^) h X
- Naturally, we will need a MySQL server to store the data for us, this document ; ?. L/ [. m8 Z/ f* R& F
- will not explain how this can be done - there are documents out there for the 4 u1 I* M; o, P: k! Y; h& e. U9 O5 v
- interested. The requirements include a (empty) database for TeamSpeak to use, ?) G% b! y% e. P
- and a user account (username + password) that has the permissions to do stuff
( }& z3 q0 u T' _( E" ` - with the database. Additionally, you will need a vendor library installed on the8 a0 F' V9 @: q6 c% r& I6 ]" P+ u
- local machine, this came with my MySQL install./ L% R* t% n" [
- These instructions will not tell you how you might transfer your data from the1 Z/ r1 ~) {; M3 E6 n& i" t
- SQLite database to the MySQL database, we start with a clean and empty MySQL
! V( w3 K, m R j1 f - database.
4 q% x" L, T+ q/ h7 ~3 R6 V( r" W, g' u' y - Some users have reported ways to import a SQLite database into MySQL, but at' _7 A# k- q v5 a
- the time of writing, there are still too many issues - check the current status& M; r1 S: W5 p
- in the TeamSpeak forums if you are interested.) Q7 w1 ?/ W3 |1 l: @
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& y1 Y( |$ n3 I; D8 J
- Borland was used. This driver can only interface with the client library that
' L7 a4 a; i: _7 w% U1 |3 f - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; Q: f# S! N& k8 ?& X* u
- client library - basically all you have to do is to use a 3.x client library as
& X2 |* v- L4 r0 A% w0 t - "VendorLib" and a 4.x database to connect to.
6 L e) W2 H- Z: w0 G - If you need more info about dbExpress, you can contact Borland.
& ` c7 b8 T* T8 i5 w, ?' @
, i+ P0 f9 q4 o5 O: P# A- ### Doing the work ###9 N8 m- V0 [9 n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* U7 N+ c4 h' \9 k# M
- the perquisites right, just open your server.ini file, and add this section at5 q( X. x1 W3 {7 a/ @* Q
- the end:; d/ H" l6 k) Y' j N, K/ V
- ---cut here---
. P+ \. B( l1 C; n/ q8 W - [DBEXPRESS]
2 O% ?1 {& t- F2 u6 E - sqldir=mysql_sql3 x( a8 b4 w. a0 V; I3 \% z
- Drivername=mysql
6 u: E9 c! F* W' }6 d) `* t# B - Database=Your_Database_Name_Here
- p9 G9 j7 f# k8 P - Hostname=The_PC_the_MySQL-Server_is_on) @3 {, \2 _$ t$ x6 t z$ n
- User_name=User_name_on_the_MySQL-Server
$ T! w* y3 s6 A5 Q. z- z - Password=Password_to_go_with_above_user_name
, N8 h$ v, `6 j! b% I/ K; b - GetDriverFunc=getSQLDriverMYSQL. O# v! x: N b& f* A3 W! v% L
- VendorLib=path_pointing_at_your_mysql_vendor_lib
4 ^& N* D$ n/ a. V8 @: x - LibraryName=path_to_libsqlmy_libary# L) b: g8 N* y, H* _
- Active=1
2 ]" r* F& ~8 _5 y( e! x - ---cut here---
3 J$ o, W. s( f8 \5 ]' e - In my environment (a linux box with a MySQL server running locally) I have:; E9 Q1 z6 I& S
- ---example---' G) f" v8 l9 _1 [1 O, S$ U6 N+ n
- [DBEXPRESS]
! j: S, z) h A - sqldir=mysql_sql( m9 j7 p" H* k; i
- Drivername=mysql; c- L+ q+ u3 s9 N, z% o& u4 f# E& G
- Database=test& H8 H. b* Y! j) N! P0 \# ~) W" L
- Hostname=localhost. f* w" o3 ?4 ]. u! L
- User_name=testuser
/ i' I7 |0 `; L7 j& ~7 k6 ~ - Password=my_password
+ e% W6 W: `1 O2 c7 V2 p& F - GetDriverFunc=getSQLDriverMYSQL
" L1 Q) ^2 P& j2 Z* B& V/ {" a - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* R: T9 k. S, Y$ D- g4 t5 s3 g - LibraryName=./libsqlmy.so
b9 o/ n& b9 w. b5 X) Y$ o - Active=1
% t+ T) g# G* G) i( J5 l) f4 | - ---example---+ s$ ^. g9 [3 t8 z
- ( m5 g; r7 x9 R ^- ^, Q- G
- On a windows box, also running the MySQL server locally, it would be:; R, n3 S" H1 r. d0 e; P7 U
- ---example---
$ u- x* F3 T! g" a; w - [DBEXPRESS]9 V% I+ d' r1 f* G
- sqldir=mysql_sql. w- ?+ U( u5 M9 ~! w
- Drivername=mysql
' m! Q+ |- B* w% Q- N - Database=test! _; R; c! G6 V" F$ x: ^# P
- Hostname=127.0.0.17 b7 W0 F2 E( p. { e, x
- User_name=testuser
# U6 B; U$ f+ f+ ~& A# J - Password=my_password
9 d# U6 V$ d- i! E& @" U - GetDriverFunc=getSQLDriverMYSQL: K6 | n1 k1 g5 ~( }
- VendorLib=libmysql.dll8 g( p* |; n9 j4 d/ [
- LibraryName=dbexpmysql.dll
* W! D- r- m/ G/ i- k1 z( s, ^# ] - Active=1
6 o4 x6 M# s( s) R( `6 f) R% V - ---example----1 r$ F5 E& n) X p+ |+ v
- - written 02.03.04 by pwk.linuxfan
% R% Q: j4 h0 p - 3 l# C6 K/ X- D; U
复制代码 |
|