|
|
麻烦翻译一下,下面这段文章:xhan $ t9 ~% B! P6 N6 w8 ^" a
2 P& M/ w$ U+ }9 {7 b/ H; {! a-
! e( |9 p8 E, k. q1 y, m# _4 Y - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
% Z% D9 h5 Z6 V0 A$ G" Z% Q2 s) i+ A) D
. F4 M9 W$ t: N, c8 }4 S0 P4 V3 {- ### What we need ###' c1 X8 S$ u4 m' Q* @4 ]5 @
- Naturally, we will need a MySQL server to store the data for us, this document
8 }; d2 Y2 J7 q9 p% I - will not explain how this can be done - there are documents out there for the
# m4 \* `9 @3 o0 ] - interested. The requirements include a (empty) database for TeamSpeak to use
5 z, t/ W. t6 C+ V* [/ f - and a user account (username + password) that has the permissions to do stuff; `2 N d1 @; }2 T5 E0 V4 |( b
- with the database. Additionally, you will need a vendor library installed on the8 R% Y& w9 c9 H# r" N; F( B9 ?0 i
- local machine, this came with my MySQL install., l `3 J6 Z4 E( Z7 i6 D
- These instructions will not tell you how you might transfer your data from the
+ s r! @% ]! ~$ ` - SQLite database to the MySQL database, we start with a clean and empty MySQL
( E3 C8 O: O- s2 F" Z E - database.
) H) c1 t9 F) s - Some users have reported ways to import a SQLite database into MySQL, but at
. [2 x" C7 { g - the time of writing, there are still too many issues - check the current status
3 O" o0 o P0 p3 w: f1 B5 H( _ - in the TeamSpeak forums if you are interested.
! Q, k8 J1 x+ l6 c* P - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
Z$ [3 h0 S, T* T: E0 W - Borland was used. This driver can only interface with the client library that
8 @7 f& ^, M& H8 O0 B - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! W9 R/ k' Q2 P3 u, E
- client library - basically all you have to do is to use a 3.x client library as 4 y2 V ^1 }+ v" c
- "VendorLib" and a 4.x database to connect to.
0 ~% x/ _% ]" e' i5 ]0 L - If you need more info about dbExpress, you can contact Borland.
7 Q+ O1 c1 P. L& k4 L# Q/ u
% p) N" t; f5 I. T% r4 V: k& `- ### Doing the work ###- G. S7 f; w: {8 Q3 b% M5 b* Y
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ j. y& o: U4 j: o7 k- p - the perquisites right, just open your server.ini file, and add this section at
$ q. }1 c; H$ F4 L9 P - the end:4 H9 p" i- P& ^& S, c
- ---cut here---" k* ~9 B) [# f
- [DBEXPRESS]
* `# I. s9 @: C6 _& b - sqldir=mysql_sql' o! P$ k% l; N3 _: V- }
- Drivername=mysql
8 T2 E! {. L* S& o$ W - Database=Your_Database_Name_Here& e3 z, E0 \7 V9 F
- Hostname=The_PC_the_MySQL-Server_is_on% t4 e0 F7 D' z
- User_name=User_name_on_the_MySQL-Server: g5 @+ P1 X# D% H# d1 t1 T
- Password=Password_to_go_with_above_user_name- c: A/ w7 j- ^8 A3 z
- GetDriverFunc=getSQLDriverMYSQL: ]& h5 \) R% ?* O: F% X
- VendorLib=path_pointing_at_your_mysql_vendor_lib( g; k% v0 P8 \" B2 S2 C
- LibraryName=path_to_libsqlmy_libary8 y0 E% _% P3 |9 |5 T% S
- Active=1
0 P- q2 P0 F/ P - ---cut here---9 z( K/ z: [( D& Q+ \: \
- In my environment (a linux box with a MySQL server running locally) I have:
; ~1 w+ g7 e! S- ^% u0 P - ---example---6 l( L7 F4 f: q& {: O! J' w" @! E
- [DBEXPRESS]( P0 t: l4 g- t8 V; A+ \
- sqldir=mysql_sql5 r p }; K9 ~. L. I
- Drivername=mysql
# y2 o5 b' S S- _3 R6 L) D- D - Database=test. z3 g7 s9 E9 Y) r3 P2 P
- Hostname=localhost
3 \" D& B+ U; J" V) A9 @1 a - User_name=testuser
- O$ `9 _9 t; @ - Password=my_password
3 J$ v8 n8 s# b - GetDriverFunc=getSQLDriverMYSQL
: E" V$ ~& _, s. } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
& W+ H# j. B. p% P+ N) y - LibraryName=./libsqlmy.so
5 G! S( B0 A }/ O - Active=1
: N7 |$ Y+ Q! I( f! ^ - ---example---" A, M* M& R! p
3 i( l; I) }+ B, p, ?- On a windows box, also running the MySQL server locally, it would be:5 f: h. `8 E7 p9 z# _ s9 n: _1 I
- ---example---) x2 p5 q' }6 T1 T. I
- [DBEXPRESS]
$ A7 X8 n$ z% C$ ]& f, V - sqldir=mysql_sql. X' h& |1 j3 S N: A; M% L U0 \
- Drivername=mysql& ^: e: {4 P* {: N7 k: G% N, Q0 O$ U
- Database=test
& I8 n, j* s+ b% D - Hostname=127.0.0.1, w2 @1 t' d% Z$ ~/ W
- User_name=testuser4 @% _0 a9 O& H5 e6 e$ D! j b
- Password=my_password5 ~7 g1 I% R3 f$ V, m7 w
- GetDriverFunc=getSQLDriverMYSQL
/ B9 g6 ^7 d' U6 N! u - VendorLib=libmysql.dll n0 q z9 k# p6 C1 T
- LibraryName=dbexpmysql.dll5 T5 y7 }; u' }/ U# q, y3 s
- Active=1
& ~8 _( C7 Y4 H1 ]9 I - ---example----% ~& C$ `7 N% e8 N( D) B. b
- - written 02.03.04 by pwk.linuxfan# G" \" b' X0 P" x2 `
- + W- H- p- Q$ V# ~" ?3 e
复制代码 |
|