|
|
麻烦翻译一下,下面这段文章:xhan $ P5 ?) p8 }+ G, N! n2 q7 n
0 K: q; R* F& |-
% a$ I) H7 z+ ]! U# j V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( `6 w; A& u& c. ]8 l - 1 t+ {, y: G+ E* g1 r2 n# o& D
- ### What we need ###2 U$ F: }% \7 V; F0 i
- Naturally, we will need a MySQL server to store the data for us, this document
e* |0 l3 ^+ E; F( R - will not explain how this can be done - there are documents out there for the ( W }; j5 F5 A) r
- interested. The requirements include a (empty) database for TeamSpeak to use7 X# ^* `" _0 ?1 y5 c2 H& Y
- and a user account (username + password) that has the permissions to do stuff
3 V1 K5 z) m4 c2 r# F+ I - with the database. Additionally, you will need a vendor library installed on the
% c* s! ]0 [; T! ?; ~, t - local machine, this came with my MySQL install.
( N o$ w \* O1 @ U/ h) u - These instructions will not tell you how you might transfer your data from the
# J6 y# G2 K) V: C% b* C+ q - SQLite database to the MySQL database, we start with a clean and empty MySQL
1 ~5 s3 k& V U$ ]7 N6 u% S$ N6 g# T- O3 K - database.9 I$ F2 r2 R; b( K( {
- Some users have reported ways to import a SQLite database into MySQL, but at! C& o$ s3 c2 R5 X( W, _5 W; |! ^
- the time of writing, there are still too many issues - check the current status
: u& l0 m) C& E* ^5 E7 { - in the TeamSpeak forums if you are interested.# @ q, ?+ Z9 n e) e7 t
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ ^; {0 |) y% x! U7 b. O
- Borland was used. This driver can only interface with the client library that
) o% d7 F0 V; u# U# J - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# W4 u( ]4 o2 v8 B1 Y
- client library - basically all you have to do is to use a 3.x client library as
$ s, O! K* W1 V2 L c; a8 ^ - "VendorLib" and a 4.x database to connect to.& U/ C* J; O6 }8 U0 M: Y0 t
- If you need more info about dbExpress, you can contact Borland./ Y8 S: E" c/ h2 Q0 v5 w6 W& w
- 9 S f/ L0 E; _- W. I1 u' c. m
- ### Doing the work ###5 y- f; p/ V& E
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all# ~$ p3 m8 H1 R% q- w) E2 V
- the perquisites right, just open your server.ini file, and add this section at
7 M" [- C0 D, E- P/ Z7 n# p1 ]% q; s - the end:1 I$ T6 K$ A' l8 G, s
- ---cut here---
, T. ~0 b9 [1 @ - [DBEXPRESS]
1 c! Q6 k# m+ o) ]; w - sqldir=mysql_sql
& P7 i( k4 h; Y" ~ - Drivername=mysql8 \6 ]5 [9 [; ]; G6 |- {
- Database=Your_Database_Name_Here
/ d! {: ]" ]. I0 D; E6 \" z/ y - Hostname=The_PC_the_MySQL-Server_is_on5 s0 S8 ~1 s2 f: U2 X1 F
- User_name=User_name_on_the_MySQL-Server
& Z+ i& Q! q/ c# @9 D* @6 U C - Password=Password_to_go_with_above_user_name) n2 H* n5 h1 I0 `6 r# I$ j
- GetDriverFunc=getSQLDriverMYSQL, h4 X" H1 f6 j; p4 [
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ L7 v6 w, l, A/ K* M3 n( C3 i0 u - LibraryName=path_to_libsqlmy_libary/ G, z2 D4 Y3 b8 V G; f
- Active=1. q; X* ]5 D2 W$ g/ t1 n0 z! q" @
- ---cut here---
* I9 `* A& t+ P& k( |$ u" A) ` | - In my environment (a linux box with a MySQL server running locally) I have:
$ p7 k. z2 }4 \5 |: F' P- N# _- y - ---example---6 T5 J# X* X6 t& t
- [DBEXPRESS]
; _: c1 Y- e4 _7 ]) n - sqldir=mysql_sql, m- L% V6 L4 `7 B5 z- n
- Drivername=mysql
+ G6 S$ R/ I( K, [. M4 ?0 Q - Database=test, k+ i- _& V" ?" V3 T2 I
- Hostname=localhost
8 \* d- M% k* K - User_name=testuser, H) w8 V' ^, h* y
- Password=my_password
4 b( t" m [( D - GetDriverFunc=getSQLDriverMYSQL
: ~( O* n" _: s4 I - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0$ Q6 `% G3 h$ Z7 x9 j! \+ W7 ?
- LibraryName=./libsqlmy.so
/ [. o/ K4 {. Q; v, {, o - Active=16 z2 W# Z1 D# B1 o6 V
- ---example---
4 m5 V' S4 m/ r$ d - W% P) M% t0 k- z7 v
- On a windows box, also running the MySQL server locally, it would be:
* K- O9 s. L( v9 u) V) v - ---example---: o8 q- |) n6 [- Y5 ]" m
- [DBEXPRESS]' N1 C/ U" n; t
- sqldir=mysql_sql' ?! Q1 V7 L6 R, U* `7 N* B# u% Q
- Drivername=mysql
2 P2 f% N( j' A7 @ - Database=test
6 E7 w U4 |, f' @3 R - Hostname=127.0.0.1
) A: a! D$ p& E0 H - User_name=testuser
% M9 y) P" f" y% {; r! j - Password=my_password
$ J3 j1 f9 N# [+ H$ F - GetDriverFunc=getSQLDriverMYSQL
; Q% [( Z. k1 V/ W0 L& i - VendorLib=libmysql.dll
$ p% S- X* {( i# ~* G( C - LibraryName=dbexpmysql.dll
. O0 _& q+ a9 d9 D - Active=1
( f' d& w( Z$ f* H) l/ i) [2 y - ---example----
: r' j3 z1 y, I - - written 02.03.04 by pwk.linuxfan8 B- d, u) s' }; y% }
+ R& ]4 `4 `% F8 z" |
复制代码 |
|