|
|
麻烦翻译一下,下面这段文章:xhan
y$ \% ?2 _0 n, W* @$ B `7 F. }- x/ x' o0 e7 Z3 J4 i
-
/ w0 ~% i% A* ]2 [! n - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 W& i# a5 E K0 Z$ F* [; b$ ~: i
- , K$ s; M. w5 _4 {3 Q, g
- ### What we need ###
) w* v, Q- D6 i9 l l. `" S - Naturally, we will need a MySQL server to store the data for us, this document Q/ [2 n9 q$ E3 @ H1 j
- will not explain how this can be done - there are documents out there for the 7 h E1 ~8 _$ r8 ~: |' z5 s
- interested. The requirements include a (empty) database for TeamSpeak to use
4 Q: A2 O i- K+ ], o5 a6 B; ~ - and a user account (username + password) that has the permissions to do stuff9 k& Z! m- a& d& R
- with the database. Additionally, you will need a vendor library installed on the
( x' z8 L2 U, l) _8 c - local machine, this came with my MySQL install.! M7 v" g6 j3 S) y6 I' b
- These instructions will not tell you how you might transfer your data from the
% c8 a. a. J/ @/ @$ R - SQLite database to the MySQL database, we start with a clean and empty MySQL( |( Y! n" {& X* n4 e& q1 j5 G g$ F
- database.5 G" U' G+ W' x$ \" `
- Some users have reported ways to import a SQLite database into MySQL, but at
# r" D5 e2 _! T6 J - the time of writing, there are still too many issues - check the current status$ P) J0 ] T' R. Z/ M
- in the TeamSpeak forums if you are interested.
% R* h. w. Y- q% R* \$ F, L) A - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* t3 T/ p9 ?( O: e( O1 @# t
- Borland was used. This driver can only interface with the client library that * r: ^# S; _+ h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 T- c0 q/ X0 J, r - client library - basically all you have to do is to use a 3.x client library as
' i0 ~! A! ?; _, l - "VendorLib" and a 4.x database to connect to.4 R& V( {( @3 m: }
- If you need more info about dbExpress, you can contact Borland.
$ f, Z, U" [7 G* u - 6 M# Q! q ?0 C/ e
- ### Doing the work ###4 v: I) }/ }7 u) H0 [; }' E
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 b% w9 E8 w9 l& K
- the perquisites right, just open your server.ini file, and add this section at2 p9 y4 ~4 v' ^0 A
- the end:: x# | R- V" q0 i0 c0 A+ L
- ---cut here---
$ d o: u: L- g3 s0 k" `% A - [DBEXPRESS]
+ e+ l$ a1 G$ {4 m1 w - sqldir=mysql_sql, B3 L1 b: C8 Z* z( s5 ~
- Drivername=mysql
, L5 |4 q2 v7 D4 ]: | - Database=Your_Database_Name_Here l& p# q( s) e) d8 D3 Q) p
- Hostname=The_PC_the_MySQL-Server_is_on& s3 Z0 a" M! C" c1 V7 m+ o
- User_name=User_name_on_the_MySQL-Server
2 M0 f7 f R( e8 A% R4 I - Password=Password_to_go_with_above_user_name
8 N% p; h, G7 T/ x) P( w$ `# H X - GetDriverFunc=getSQLDriverMYSQL
3 N- D. ~3 y3 \# C - VendorLib=path_pointing_at_your_mysql_vendor_lib
# r3 N" ~: q# V; z& r - LibraryName=path_to_libsqlmy_libary9 G1 X0 i2 h' o/ ]7 b; |' |4 c" {; [
- Active=1
* @9 R W: w( N! Q3 G$ \, X: s3 J - ---cut here---& g5 w0 g% w/ T
- In my environment (a linux box with a MySQL server running locally) I have:, c, d5 H1 o3 W# S" b2 n! ~& C
- ---example---5 r9 f3 b* b& ^0 `
- [DBEXPRESS]1 X {2 o; ]& n) b% I
- sqldir=mysql_sql
, X7 Q. h+ F6 i9 a9 Q - Drivername=mysql: z/ d {! K% x/ U2 u% f% S
- Database=test
5 q2 z6 R# _% h# [2 p' n/ p - Hostname=localhost
1 e z. Y' r; W1 r4 P% X - User_name=testuser& M4 U5 R$ u$ e; M( g" Z
- Password=my_password
; S2 I2 W& L+ m5 u5 N3 D- y( K5 y$ f - GetDriverFunc=getSQLDriverMYSQL# V; V/ p* U1 x7 r$ V4 @ Y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
) M1 y7 n4 O- Y( R+ i$ }% | - LibraryName=./libsqlmy.so
- Q4 H& O3 \( Q6 [/ V0 q - Active=1& p/ j+ I8 {4 H+ E: p& @/ _0 _
- ---example---
: r2 ?# W- R+ P, W6 `
- \* R8 W* H0 q& O3 C, Q w! n- On a windows box, also running the MySQL server locally, it would be:# l Q0 t! n. `1 |4 V
- ---example---; b( W# K$ m$ ?* O: N% U7 b
- [DBEXPRESS]5 ^9 Y9 E) _; s$ p q1 W
- sqldir=mysql_sql4 S& {/ V0 |# X. `: l
- Drivername=mysql
+ @& i" ~7 m* O* \: y! O& y" {3 G' g - Database=test
6 F) J5 J, J$ j% Q( |: ^ - Hostname=127.0.0.14 y' _$ E5 o" @4 j4 ]7 Z7 |- e9 k
- User_name=testuser
; L6 w* ~) y; r, a# q - Password=my_password" ^ m4 j/ C9 H# @" f6 h
- GetDriverFunc=getSQLDriverMYSQL
+ p. d- P" ^. O) A - VendorLib=libmysql.dll( l* d7 \' d! E0 m* k( H. ?
- LibraryName=dbexpmysql.dll
* m5 }% b9 ?' V9 z* D) m - Active=1# h! ]* j0 `; X: a) A% e8 N
- ---example----+ a' x4 q5 V7 d, m6 Y
- - written 02.03.04 by pwk.linuxfan9 {/ ~& E" x0 _2 p! i) v+ k# ?
- 7 W6 t" a" J8 t; {, I
复制代码 |
|