|
|
麻烦翻译一下,下面这段文章:xhan : J2 R: \" x. c/ f2 y! o
0 N' r7 b4 a% g2 w7 L: n
-
0 H& T$ i3 ?* l9 \ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######+ C) C! F D& o. d# N
- 5 {' s0 j: a4 v' X; D
- ### What we need ###( t& ~1 v$ ]3 r/ t& x
- Naturally, we will need a MySQL server to store the data for us, this document ( v' j. T1 X- y# N* N
- will not explain how this can be done - there are documents out there for the 0 }; f4 Z0 f5 m- q* S0 R2 V, U8 `" K
- interested. The requirements include a (empty) database for TeamSpeak to use
7 E5 a/ z! @' `( ~3 ?- a& v - and a user account (username + password) that has the permissions to do stuff
, g, e. [7 Q/ L" ]' x. R - with the database. Additionally, you will need a vendor library installed on the w" _* G6 i' z9 Z6 n! q
- local machine, this came with my MySQL install.+ G; x. o; U5 {) Z
- These instructions will not tell you how you might transfer your data from the( U1 B; ^) y0 a9 b
- SQLite database to the MySQL database, we start with a clean and empty MySQL
: b- }6 E+ K O/ {8 E# Y/ t) e' _: z3 L - database.5 T+ {) n( w/ w: k" J U" j9 Y1 K6 H
- Some users have reported ways to import a SQLite database into MySQL, but at, ?# r! {3 r) s- c5 x
- the time of writing, there are still too many issues - check the current status
' M) T Y8 I q+ i" g1 k - in the TeamSpeak forums if you are interested.( V$ M( @& ?0 b3 @- A5 N
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 B3 t7 W- k. A K4 T- G, U - Borland was used. This driver can only interface with the client library that ! P# a- A& F) |7 A
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 e# C: |1 Y/ Z6 [7 X
- client library - basically all you have to do is to use a 3.x client library as
# Y0 Z5 g/ h7 X+ u! i* f - "VendorLib" and a 4.x database to connect to.
, @. K% W, J1 e5 t1 |3 a: m' c - If you need more info about dbExpress, you can contact Borland.
1 z9 j r9 B: w# r- | - 4 ?# \" s% o. Y4 z: M
- ### Doing the work ###
1 V0 H# F) X$ ~8 N, y6 h - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
& _# e- {" h- i - the perquisites right, just open your server.ini file, and add this section at
- X& B+ U7 y' n4 x5 R4 T - the end:
g/ Y) H& \/ A ~ - ---cut here---+ E" t r9 g, |1 L
- [DBEXPRESS]
2 F' c& e; A8 {" Q) b - sqldir=mysql_sql) d( t& M2 z8 ~4 n& G/ L4 M
- Drivername=mysql
5 e0 [- v o" n1 S- a - Database=Your_Database_Name_Here; E; q3 R+ y& C* T2 f
- Hostname=The_PC_the_MySQL-Server_is_on
6 Y% v: J4 D, S; j# C - User_name=User_name_on_the_MySQL-Server
* B* b" L4 Z0 ]8 t6 c. R5 { - Password=Password_to_go_with_above_user_name
& Q6 B8 G5 w2 F+ @$ [( j( q+ {$ h+ B - GetDriverFunc=getSQLDriverMYSQL& P/ p) j. @+ O5 |$ [$ \9 }
- VendorLib=path_pointing_at_your_mysql_vendor_lib
6 G$ ] j. w0 S8 d; o6 A - LibraryName=path_to_libsqlmy_libary T7 ^2 N1 D5 z" X( P1 O5 `
- Active=1* t8 r3 u. f( W8 |: t0 Q
- ---cut here---6 ?2 R/ d% L; j) ?0 I0 x5 Q
- In my environment (a linux box with a MySQL server running locally) I have:
; ~- Q8 b1 u6 g- j! n1 Z' C - ---example---' R1 h7 m: s' _
- [DBEXPRESS]9 k5 g9 K# D6 G) l0 I5 J; b+ C
- sqldir=mysql_sql+ Q+ S4 }4 L, J! a
- Drivername=mysql7 M/ f9 g, L$ t& x
- Database=test
/ o1 O6 b+ |- O- l2 Z - Hostname=localhost
0 ~# j+ r: t+ E - User_name=testuser4 q- R* q5 u7 i) p
- Password=my_password; k4 A" Z* g. w, N; y1 s
- GetDriverFunc=getSQLDriverMYSQL
( R+ A6 I5 m% E) |0 u - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 x9 l' \$ h: T' w
- LibraryName=./libsqlmy.so
2 ^" h: S* {1 z7 g; p& c4 f - Active=1/ T: i0 L# z: W! e, c
- ---example---
+ h' s' p4 P2 j+ ^
. i& H& i' _( n1 {2 ^- On a windows box, also running the MySQL server locally, it would be:# M9 F2 Y, |8 U
- ---example---
* c6 R3 P' E, ~8 b% o {" Q: j - [DBEXPRESS]6 o. m. D% k/ J f9 T5 j& `* e
- sqldir=mysql_sql
% y! Z& C) ^/ P2 J - Drivername=mysql
$ Z6 }7 g2 q0 s. Y b3 @ - Database=test
( h$ F' I0 ?; Q; I+ y( t. Y - Hostname=127.0.0.1
/ g J0 @* m. q4 L5 P - User_name=testuser8 T! t5 |* ], r/ Y
- Password=my_password
) V: t# ^ I' K0 q/ P - GetDriverFunc=getSQLDriverMYSQL: g9 z6 |" ~* V. p! Z
- VendorLib=libmysql.dll
6 A! p( u6 Q! o, H - LibraryName=dbexpmysql.dll
0 S% a2 X* [: G+ p7 n3 u. X% M' Q, m7 v - Active=16 f( ?' U O3 q& D, V+ ]7 A
- ---example----2 H: \( ]2 c' t; F6 |2 _3 x
- - written 02.03.04 by pwk.linuxfan: U0 j0 M$ J3 p# D3 U- N
9 i f+ i& l O4 b7 W" f2 ^
复制代码 |
|