|
|
麻烦翻译一下,下面这段文章:xhan + {& Y( r* h9 P7 u2 ?$ n l' y
' j* x& ~6 X, {% v
-
2 c. h3 a( q! k0 S- F# q# o; I b/ z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 j/ {% o9 ?1 W# P3 B) K
. w/ d1 n$ ~8 a3 Z) y- ### What we need ###
' |; ], Y6 A7 G; K - Naturally, we will need a MySQL server to store the data for us, this document
' u& f- ~$ |7 C# i, |7 ?+ U$ ] - will not explain how this can be done - there are documents out there for the Z( X- H4 u2 I Z
- interested. The requirements include a (empty) database for TeamSpeak to use
& g9 ]2 D! E( p: @) t - and a user account (username + password) that has the permissions to do stuff/ H2 Z( F4 q% n% ~
- with the database. Additionally, you will need a vendor library installed on the; n4 F! m9 P$ \& h4 y: M! B
- local machine, this came with my MySQL install.
! b1 N8 {1 h' Y w; I - These instructions will not tell you how you might transfer your data from the
: @* ^4 t& e0 b) R' u - SQLite database to the MySQL database, we start with a clean and empty MySQL$ ^& r1 J* k- h4 c! y2 j6 R
- database.
4 {1 ^+ g7 k$ W' V. k1 r3 D - Some users have reported ways to import a SQLite database into MySQL, but at0 ^" b! o5 V6 O: ^+ m# J
- the time of writing, there are still too many issues - check the current status( N i+ F( M4 X& A ~
- in the TeamSpeak forums if you are interested.
3 Z. Y( w( r" y8 }( L/ b - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" g4 u( I' d2 g- R; f* D - Borland was used. This driver can only interface with the client library that
/ x+ m. ~% d2 S3 b - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
& \* {6 v, C5 D- s - client library - basically all you have to do is to use a 3.x client library as ! @0 o3 ]+ h& v& F# m
- "VendorLib" and a 4.x database to connect to., D+ n& z8 A) o4 Y
- If you need more info about dbExpress, you can contact Borland.
+ \4 h- q/ x0 x! {* a( z - % M4 P o0 x# r
- ### Doing the work ###
. H0 c; R0 D! y* ^' a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
8 t4 Y/ G- @4 W. A% H - the perquisites right, just open your server.ini file, and add this section at
2 f( m% `; E6 o$ u8 t4 U" p - the end:
4 k; u: I2 d" ^0 T1 u- t - ---cut here---
7 X3 j/ J1 u, s - [DBEXPRESS]
8 j2 h9 i( T0 D8 I8 w1 q- ]5 N - sqldir=mysql_sql; ~& d; i4 m2 }
- Drivername=mysql* j, O3 O: p3 b6 j( w
- Database=Your_Database_Name_Here
7 n) E6 J3 d) a/ {" N - Hostname=The_PC_the_MySQL-Server_is_on
- s R8 C9 {% S( j - User_name=User_name_on_the_MySQL-Server( u: ~4 x9 K" p, Q+ ~) J; L
- Password=Password_to_go_with_above_user_name F% @/ y' _+ M8 U' ^# v5 k
- GetDriverFunc=getSQLDriverMYSQL: \1 F3 F1 q+ [
- VendorLib=path_pointing_at_your_mysql_vendor_lib
3 V: m: d% }7 d1 E8 P$ P I" { - LibraryName=path_to_libsqlmy_libary
K0 x# P) d: F( a - Active=1
' i7 f; N% o r6 K0 I+ ]. q% n - ---cut here---" L. U; _9 f: W* Z+ H6 Z6 O
- In my environment (a linux box with a MySQL server running locally) I have:* v" f; e/ M$ T. k' d1 w
- ---example---
, Q! w5 t h$ U* N+ H3 c - [DBEXPRESS]
+ I+ _2 E8 @% W2 ]2 V4 I B& P - sqldir=mysql_sql7 u p$ U j$ T' P" `; Y- @$ T% R
- Drivername=mysql
- }) k& ^/ R" \8 Z9 {8 a7 e& | - Database=test' x6 z' W. z7 R) H" o/ V* @
- Hostname=localhost
4 v; J7 v3 U- r5 s$ a# F - User_name=testuser
3 P' K3 t6 ]* o$ X3 O7 T- e - Password=my_password6 j0 g1 o& h. y4 J3 O
- GetDriverFunc=getSQLDriverMYSQL& D; E: T d- H9 m5 P" D
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. t# T& g6 j7 S6 B' L9 p. N! Z
- LibraryName=./libsqlmy.so
0 `" T8 t u2 \( p/ \- w. M - Active=1
_* C8 Z9 ?7 i, O0 z1 r- E9 c Y0 I1 c - ---example---( r6 A' Z, ~. }: ]
- . `& r9 i% P$ v2 Q, B% Y
- On a windows box, also running the MySQL server locally, it would be:
+ P5 w f9 }6 o/ Q" j. M - ---example---3 y/ |: ~% E+ \7 }1 J4 w3 A/ `' Z
- [DBEXPRESS]
K' W/ ^3 `! ~7 p. o3 g; ]' _ - sqldir=mysql_sql
, @( e2 V! [4 X+ O$ S - Drivername=mysql: M I+ ?9 i8 o+ b9 e& T
- Database=test
/ F) C# D7 _! F+ K - Hostname=127.0.0.1
7 J0 x5 n) F7 f: P - User_name=testuser) U8 r9 S$ [" U2 k3 Y3 |8 J
- Password=my_password: E9 ~9 v; L L* K
- GetDriverFunc=getSQLDriverMYSQL. Y: Z' K5 O1 J1 ~& }6 x& V! s
- VendorLib=libmysql.dll
- a3 c L9 I( S - LibraryName=dbexpmysql.dll
, A' P1 `# `+ W3 r' l - Active=1
( r4 B3 g% v9 T+ I2 n/ V) S& H - ---example----
, O# {: [& ^% M% _1 R4 x9 W - - written 02.03.04 by pwk.linuxfan
3 n; E; p' ^# ^% A0 z3 u( t! a: `$ J - 6 [3 k G' v1 b, k9 H$ s& F" D- h
复制代码 |
|