|
|
麻烦翻译一下,下面这段文章:xhan 0 A# r4 @; \3 X3 {# V) V6 z6 a$ T, \
?& u8 p7 p K% E; u& U! U3 r-
) y t# }/ u# Z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
6 w, U1 o7 B/ ]* [
' m) k. _6 _9 _$ [+ l- ### What we need ###- o5 G3 O" @8 ^5 ]
- Naturally, we will need a MySQL server to store the data for us, this document % p( g9 S' ?& H7 n y
- will not explain how this can be done - there are documents out there for the
o; A3 @, I! K$ C7 l - interested. The requirements include a (empty) database for TeamSpeak to use
" h7 v- | M9 G8 f/ m - and a user account (username + password) that has the permissions to do stuff
/ U* C# Z$ p7 \$ m& V/ F# J0 J - with the database. Additionally, you will need a vendor library installed on the, g. S% n- I/ E0 ?' ?% p
- local machine, this came with my MySQL install.+ d o: }/ |9 J0 [( w' X
- These instructions will not tell you how you might transfer your data from the5 F' Z7 i; t; P7 x4 } o
- SQLite database to the MySQL database, we start with a clean and empty MySQL0 B: t, H9 w3 Q. s6 o2 j/ V/ h
- database.
9 { M, N1 x% E* K% h) k: L! Q: H - Some users have reported ways to import a SQLite database into MySQL, but at! m! l- V! Q, T) w/ ?$ M
- the time of writing, there are still too many issues - check the current status
$ Z6 j7 Y8 w) a5 [) x - in the TeamSpeak forums if you are interested.0 a8 p+ Q) q( P7 M; v
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) ]! c) e8 Z. H- _; F
- Borland was used. This driver can only interface with the client library that
- I' S) K) S) e) x* M& A - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' V# b$ H6 T9 ]0 p/ w, P6 V/ V - client library - basically all you have to do is to use a 3.x client library as
& P% T( f8 e* A) ~5 Y: Y - "VendorLib" and a 4.x database to connect to.. i. I2 d! p4 g/ ~
- If you need more info about dbExpress, you can contact Borland.
[" o) ]7 Y8 y( E) y F9 t g
/ g% s0 ]+ L' ~- ### Doing the work ###1 `/ f2 d' b# c1 L
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
! y$ x) [% c2 R2 s: u% w - the perquisites right, just open your server.ini file, and add this section at0 _. S; z% Y% b( z5 c' F
- the end:
9 ?6 p) t: u' m- k" C2 Z* Q: t' J - ---cut here---) [" m0 H2 _$ a7 b$ a; u s
- [DBEXPRESS]
1 T5 x. f$ T6 z% r/ N8 V2 M - sqldir=mysql_sql/ l* a4 k( N, E
- Drivername=mysql
1 H8 l. X2 |. ]: V/ C2 f& D - Database=Your_Database_Name_Here7 z5 p1 V! G' g: B
- Hostname=The_PC_the_MySQL-Server_is_on
+ o' T7 S* M* ?/ |/ B - User_name=User_name_on_the_MySQL-Server
/ N* y R3 U; U; ~4 j5 d" S2 ~( U - Password=Password_to_go_with_above_user_name
9 Y' @7 ^/ h6 [# q7 ~9 q& V - GetDriverFunc=getSQLDriverMYSQL5 F! q4 p. I4 M7 a V% ^- x- u, v7 |* y: z
- VendorLib=path_pointing_at_your_mysql_vendor_lib N# Y% X% c7 {/ V; M8 ?( _
- LibraryName=path_to_libsqlmy_libary1 s a" f% d$ k$ u* F Q
- Active=1& i& B# v% M. d& D) l$ h0 q+ S& _$ t
- ---cut here---* _4 y, j8 p$ g2 P
- In my environment (a linux box with a MySQL server running locally) I have:" ?( J. h; l0 C! m: h; N
- ---example---$ ~0 S6 ?. T3 G$ P
- [DBEXPRESS]/ X" L7 \$ u2 ~8 F6 H
- sqldir=mysql_sql
) `6 Z: y+ I# J' U9 K - Drivername=mysql
+ l {) Q( `2 Y0 T8 w0 F* q - Database=test
8 B+ ]- X8 h8 p. e; i( A - Hostname=localhost8 [8 |$ I+ {- t1 F5 Q+ g0 D& A
- User_name=testuser8 k: w0 r" B; Q4 c% M) V
- Password=my_password
+ R& l) T. h% _* i! p# | - GetDriverFunc=getSQLDriverMYSQL* u# G! p7 B1 i6 `" O: ?
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* m( R$ z. a @4 U8 k% ^; x6 q
- LibraryName=./libsqlmy.so
0 m! u8 m$ v% C1 x2 j - Active=1
: L) g/ \1 _; m8 T$ Y- I* ] - ---example---
: \% h( N1 I" [: y- | - + Y+ Z# p* ?& U) |% ]6 ~* r4 ~
- On a windows box, also running the MySQL server locally, it would be:: R4 _& ^# c+ J8 I9 x) l( d
- ---example---/ D0 W! I6 b; j k$ A! q% S
- [DBEXPRESS]
" o& e% s; {, A - sqldir=mysql_sql$ U8 }& F) F' d% L, U
- Drivername=mysql% e! a8 y& r& Z' O( J4 f4 y6 E
- Database=test/ K4 j, r! N% k
- Hostname=127.0.0.1
8 K# F) I7 _& E6 y8 _$ O& } - User_name=testuser
/ G' q/ |7 i/ u4 D' O. u9 } - Password=my_password
f3 C" j4 C/ j - GetDriverFunc=getSQLDriverMYSQL# T- S& U: E% [2 t" U" A, {
- VendorLib=libmysql.dll; L5 k- J* @9 K$ Z& I+ [
- LibraryName=dbexpmysql.dll
0 r% c" r; Z+ \ g M - Active=1- h% s; j8 P/ I0 A
- ---example----" z3 m8 t; s1 w9 t* w
- - written 02.03.04 by pwk.linuxfan9 }0 N% p- I9 C5 z, g! w* d8 p; H* j+ Y
- ; r0 ^. H+ L$ Y
复制代码 |
|