|
|
麻烦翻译一下,下面这段文章:xhan
' y, J( k- E1 U8 h, P- v
9 U# \( E8 M/ q0 @! b$ E- - H% F% O( F8 F( [. O: O
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 [; J# H) U2 w }" r; A
# ^; \3 [% h/ J* G$ p( v) |0 d- ### What we need ###
- R9 N2 j- \3 Q" K0 R' T - Naturally, we will need a MySQL server to store the data for us, this document " I2 i! Z2 Y! Z
- will not explain how this can be done - there are documents out there for the
, H G4 k+ P; U y @ z: u - interested. The requirements include a (empty) database for TeamSpeak to use' P' G; l6 A* y
- and a user account (username + password) that has the permissions to do stuff' D- A- I% v9 \4 a+ B
- with the database. Additionally, you will need a vendor library installed on the) U1 W0 U1 ]) w" t: s" p
- local machine, this came with my MySQL install., E& I: i+ }6 o7 B5 C4 j
- These instructions will not tell you how you might transfer your data from the
: ~2 w; {+ s7 \5 _# Y1 ?; ^ - SQLite database to the MySQL database, we start with a clean and empty MySQL
2 `& L. a3 t6 H: m, e - database.$ Z1 ~0 g" t% a, u& n( J
- Some users have reported ways to import a SQLite database into MySQL, but at# p4 Q& }: S$ f4 u
- the time of writing, there are still too many issues - check the current status! U: L2 k- V+ e8 l
- in the TeamSpeak forums if you are interested.5 p. T3 R1 o p2 |8 k5 {7 A% y
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 W8 m" M- [' q7 g# `0 B* N$ R; {6 N - Borland was used. This driver can only interface with the client library that
0 l- z6 g2 }" u - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! q5 m1 V6 e3 y( B$ ]7 C6 @
- client library - basically all you have to do is to use a 3.x client library as
+ Q+ @6 T1 M" Y+ Q6 ? - "VendorLib" and a 4.x database to connect to.
9 ~9 M2 {, T" A5 t p - If you need more info about dbExpress, you can contact Borland.
5 N' q$ X2 a3 x2 Q - % [; `& [; g% y2 r3 r, n
- ### Doing the work ###
7 u- }$ I' a# y& u+ o0 D A% b2 a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
; z! J/ {7 i* ?% L - the perquisites right, just open your server.ini file, and add this section at, m( c! H3 A4 Z- v4 N% l9 {
- the end:4 V& R5 }0 v) q7 x
- ---cut here---+ q9 e' p4 l& D0 J' L% |) K
- [DBEXPRESS]
" [8 l0 Q, S, V9 { - sqldir=mysql_sql
9 ~% C9 ]9 m( ]2 t6 r - Drivername=mysql* [7 t: d. H! F9 Z# s% l
- Database=Your_Database_Name_Here
7 p' m+ `5 D& W2 r- n5 `8 m - Hostname=The_PC_the_MySQL-Server_is_on3 M* _/ A% @5 Z: F1 J C; Q/ a( D$ b) Z
- User_name=User_name_on_the_MySQL-Server5 X2 {6 [! e- F( U
- Password=Password_to_go_with_above_user_name
& F' M- q: s: l - GetDriverFunc=getSQLDriverMYSQL/ {! c* F# `& W# E
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. N; \* w5 Z. X - LibraryName=path_to_libsqlmy_libary. ?+ i5 l* D3 E2 E
- Active=18 t: q1 E" d. I2 `7 z
- ---cut here---
+ Q* _8 t: M1 H/ Z* c - In my environment (a linux box with a MySQL server running locally) I have: C% T% c6 z' K# G7 U3 z) }
- ---example---
; K1 s- o1 z" x8 x' i" K - [DBEXPRESS]
- k0 W" R! C& d - sqldir=mysql_sql
1 x/ R2 Q, c$ o. [& k6 i9 u - Drivername=mysql
0 T, q9 T# b+ D* j! N& \% J - Database=test, t/ q. I+ R& H) m4 S- v
- Hostname=localhost" F' ^. M0 E4 R# o3 F
- User_name=testuser
+ Y, n# C$ y' W+ s7 X - Password=my_password
( ~9 e+ I3 b c3 b' m+ L3 M - GetDriverFunc=getSQLDriverMYSQL. B4 S! b8 Z/ a& {: `
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
9 s) l! H+ T" r/ l) B" z; } - LibraryName=./libsqlmy.so% N5 V6 p, d$ u' j8 Y
- Active=1
9 T# f1 `# M8 E - ---example---
N* x" m. D- a4 K0 A/ T% v& I - ! f3 L( q" s5 g, H6 y+ f0 [! N
- On a windows box, also running the MySQL server locally, it would be:$ I& M E8 v4 h- \9 j
- ---example---
! ^! ]2 q+ ^1 D: m4 ?0 S% c - [DBEXPRESS]" p5 p" ?/ i7 I: j) @5 n
- sqldir=mysql_sql2 g G T9 u& C) u5 p& a) `
- Drivername=mysql- A5 K' R/ P2 o! b% u
- Database=test
) X# F" @0 M0 z9 i" `4 A - Hostname=127.0.0.1
" H9 m P2 q3 q( w/ O2 H4 s+ _4 B - User_name=testuser
1 q1 g# Q' i4 q0 O3 i3 p" X7 e - Password=my_password" z0 H" |- i4 M1 P1 o2 ]
- GetDriverFunc=getSQLDriverMYSQL1 ]4 s5 `7 W; X9 s$ o, Q/ P
- VendorLib=libmysql.dll& K; D% K' n! \" ]* a8 p
- LibraryName=dbexpmysql.dll
# K' f4 ?" H+ G# U. m2 n6 [ - Active=1
* p, i; Z- D2 c7 M! v* V& o - ---example----. d: g" d; H2 D3 K6 G
- - written 02.03.04 by pwk.linuxfan
& D, j8 m7 j; X9 E; j
$ Y ^3 i9 z# Z* i7 a3 N% ^- _
复制代码 |
|