|
|
麻烦翻译一下,下面这段文章:xhan 6 o. |$ |; Q5 S) e2 V
! a' l3 F# p3 S" B4 I/ Q
- : I( y5 \6 Y9 M
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: F! ]- u% n e K
e, c$ O; e* g/ B- ### What we need ###* w4 _/ m0 s S2 S
- Naturally, we will need a MySQL server to store the data for us, this document @( I& i. y/ a$ w0 D; q
- will not explain how this can be done - there are documents out there for the
- y( w2 Y0 n8 C( I4 v - interested. The requirements include a (empty) database for TeamSpeak to use( R, X% M/ U" ^; o* \
- and a user account (username + password) that has the permissions to do stuff9 o0 r' T1 o ]
- with the database. Additionally, you will need a vendor library installed on the: t7 x+ f( j" h8 ~4 v) T
- local machine, this came with my MySQL install.
4 k6 @; ^8 y& h - These instructions will not tell you how you might transfer your data from the
, `/ a- H& p; t4 l - SQLite database to the MySQL database, we start with a clean and empty MySQL
" i' b) _' {( N9 W4 J - database.- D1 j" y. x' `) H D2 I d" C) A
- Some users have reported ways to import a SQLite database into MySQL, but at4 h" F! F, i9 [7 M
- the time of writing, there are still too many issues - check the current status. c5 E) ^) O2 K* y) l
- in the TeamSpeak forums if you are interested.
1 Z- f2 K; g- w$ Y( u0 @ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ F* m8 [5 u. x" A1 o
- Borland was used. This driver can only interface with the client library that 6 `3 { M) C3 C! }/ F
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 I1 k- d8 Q1 m0 Q. v; Q& L0 Q* n# ` - client library - basically all you have to do is to use a 3.x client library as 1 \" Q/ J M% z/ `" q j4 b# K0 x
- "VendorLib" and a 4.x database to connect to.6 ~2 l0 O& f) ?1 Z) M9 k
- If you need more info about dbExpress, you can contact Borland.: ^- h, b; f* e( ~+ }9 ^
P1 B1 {- E6 W# S/ e: y' b- ### Doing the work ###
0 n/ M u( S$ ?2 a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all' \& ?' m7 @- d; J" h6 s. Q W1 L; }
- the perquisites right, just open your server.ini file, and add this section at
8 K% M& D. ?* V" j8 | - the end:
9 F( c! V- n# Q6 ^5 }" q0 y - ---cut here---# }( m2 I* y+ C) c% w
- [DBEXPRESS]+ c" s( I8 i% C5 [& l
- sqldir=mysql_sql
7 F. B% P! w3 X8 ^3 [& Y - Drivername=mysql" I/ c+ `6 d* O! C3 h0 s
- Database=Your_Database_Name_Here
2 P9 \# Q" w4 ]2 d+ ?7 K - Hostname=The_PC_the_MySQL-Server_is_on' ~* M5 n X7 F% A) V, w
- User_name=User_name_on_the_MySQL-Server V) K8 X$ g2 p+ r, U2 d
- Password=Password_to_go_with_above_user_name
3 Z7 R9 O1 f8 Q; I& e' F. ` - GetDriverFunc=getSQLDriverMYSQL3 N% f; p4 _1 ^, @: U
- VendorLib=path_pointing_at_your_mysql_vendor_lib+ X( d q, n; t4 `5 u" X
- LibraryName=path_to_libsqlmy_libary8 ]' D( _9 ?5 I& {7 a& q& ^
- Active=1
8 a H" K5 M& C) S: T% r" c - ---cut here---; F1 e7 u6 [- U- Z4 s
- In my environment (a linux box with a MySQL server running locally) I have:
: S1 R( [5 J/ Y$ C" x - ---example---
; b' ^8 a4 \7 u0 g - [DBEXPRESS]
' s) G3 Y: r* t2 ^2 Z1 I; { - sqldir=mysql_sql% N, e) R" P7 j
- Drivername=mysql
6 `: w+ }9 h7 `6 l2 U - Database=test/ ^+ j) {8 c/ }
- Hostname=localhost% h4 Y% w1 U1 B. L
- User_name=testuser
: s2 ~3 ?8 U Z6 R4 d5 F - Password=my_password
& g2 ?; u6 X1 s' T - GetDriverFunc=getSQLDriverMYSQL& J/ `! T0 `4 U# S
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* d: k2 L- M/ d( I" m - LibraryName=./libsqlmy.so
; K Y; _: q) l4 P$ h( d" B% l - Active=1& u1 T+ Q1 e' c, K: P5 T
- ---example---& L. I s# \( n: z! V b& y
+ r* O/ ^9 a6 Z, L3 _5 @# E- On a windows box, also running the MySQL server locally, it would be:
( D, ]6 P# _% J2 U) a - ---example---
0 h; g% f/ A% |9 c j F; N - [DBEXPRESS]8 t1 K; k- N& c* W$ C
- sqldir=mysql_sql q ]/ d$ ~, F8 ^
- Drivername=mysql/ g) T: }5 S; Q- M
- Database=test) e6 l" y% M- b/ C
- Hostname=127.0.0.1
1 v) P' N6 M I. L' K - User_name=testuser
4 f5 c( y5 r6 }8 _/ M# b - Password=my_password% K* H' v0 d3 W
- GetDriverFunc=getSQLDriverMYSQL
6 g% P- b7 x/ M' O) f* r - VendorLib=libmysql.dll
6 O) g0 J8 U3 \. g - LibraryName=dbexpmysql.dll7 i4 O! I6 d( I6 B/ B, r) q
- Active=1
: r' R# s" I1 {- E- W - ---example----
3 \( T6 J' j2 j/ x/ |' Y [ - - written 02.03.04 by pwk.linuxfan3 u, y% R/ ]* D4 I
" B% }& ]! o1 `6 B+ Q( G
复制代码 |
|