|
|
麻烦翻译一下,下面这段文章:xhan
# k& i; A7 j1 v
* v& R i& C+ _3 |-
2 N( l$ ~* c# X; Y$ k s# a9 s, l - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 W8 O: X2 K% D& J9 d7 w
3 Q: V0 |4 v1 l& L1 K( @- ### What we need ###
& d& R$ c5 W" U6 [8 g - Naturally, we will need a MySQL server to store the data for us, this document 4 ]9 ], [% [3 x/ m0 v7 V0 d, e
- will not explain how this can be done - there are documents out there for the 5 {/ v- J( k D v1 [7 G8 ]
- interested. The requirements include a (empty) database for TeamSpeak to use
) B) H4 y$ Z! p w% D& h# a - and a user account (username + password) that has the permissions to do stuff
$ m$ T5 n$ y1 S7 r( C/ M - with the database. Additionally, you will need a vendor library installed on the
8 \; S. p& H2 S7 ~, Q$ W( j - local machine, this came with my MySQL install.4 ?3 c' h% L# a1 k3 X
- These instructions will not tell you how you might transfer your data from the
, v, F' L k3 z, f- L' x+ Q w% c( E - SQLite database to the MySQL database, we start with a clean and empty MySQL
9 B" h9 r6 O+ B8 T - database.; \& y# T9 H% P( e* d
- Some users have reported ways to import a SQLite database into MySQL, but at( `, ]& [$ ]4 q$ q
- the time of writing, there are still too many issues - check the current status
8 P, _2 a! `5 w" o( J - in the TeamSpeak forums if you are interested. d9 h) P$ k; w9 W- B5 `
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; ^- L2 a6 \# x4 E
- Borland was used. This driver can only interface with the client library that y* T. V7 @9 m. R
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ G- {) P8 W* d
- client library - basically all you have to do is to use a 3.x client library as * o, O7 J) ? Z$ B' m1 F# L/ f
- "VendorLib" and a 4.x database to connect to.
X) v/ I/ { L$ l - If you need more info about dbExpress, you can contact Borland.
$ p6 d X! ?1 `0 u
0 c4 @6 W! Z6 c! X6 r" H6 ~& q+ [- ### Doing the work ###
1 W- H- \" F T - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 m) k& W9 Q) n) j; ~
- the perquisites right, just open your server.ini file, and add this section at
1 A- h6 `9 u3 ` - the end:; }( [2 Y) C8 M! w6 Q
- ---cut here---0 |" b+ ?6 {* n$ C2 O+ n; ~) ~& n
- [DBEXPRESS]7 [% G" ?1 X! `4 P. w! |
- sqldir=mysql_sql
1 Y7 z/ a' _% T0 d8 l - Drivername=mysql3 \' F j$ s2 |+ r7 u
- Database=Your_Database_Name_Here
6 i" Q' }$ d. F5 w - Hostname=The_PC_the_MySQL-Server_is_on
% ?9 i$ k( j! S. Q; o. g( C! N - User_name=User_name_on_the_MySQL-Server
% ]* d. K# t* v' c5 v - Password=Password_to_go_with_above_user_name
5 S& B/ b, ?' j/ x5 b* m - GetDriverFunc=getSQLDriverMYSQL
; q, `: @, R, y- J2 V9 U - VendorLib=path_pointing_at_your_mysql_vendor_lib5 a _+ X) i( Y6 s8 I! {4 u+ x
- LibraryName=path_to_libsqlmy_libary
! g" e- ~6 `7 P8 ?% j' C - Active=1
% ]& X$ S4 A8 d/ T$ p }3 n; g* j - ---cut here---
$ Z8 C: G- U6 W1 h1 n3 [! e - In my environment (a linux box with a MySQL server running locally) I have:
6 f8 J0 L' j8 s( N. { - ---example---8 c% t( g) S0 J( b
- [DBEXPRESS]7 g3 _+ C. T) q/ B
- sqldir=mysql_sql
* v% U! h7 R# ^2 O - Drivername=mysql3 d3 V* s' X* Y C! B
- Database=test
2 E0 X8 D8 x4 X. n3 @4 [ - Hostname=localhost; C& Y& I) s+ f& w3 j" ~2 G
- User_name=testuser0 X! T9 |3 T2 U
- Password=my_password
- }* M2 y) Y1 i, C' p9 p - GetDriverFunc=getSQLDriverMYSQL" r0 {7 V' h D6 ^
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. W, E8 C1 X( [& w6 P2 c7 i
- LibraryName=./libsqlmy.so
' J2 X$ B% v% F' j- M4 L - Active=1
& o; G. {+ W5 A8 D" w; q$ T( j - ---example---8 Y5 K9 k3 a+ N. j V/ p' j
' X) w0 N. g4 b* P- On a windows box, also running the MySQL server locally, it would be:7 N4 c5 V! e" i1 p. T
- ---example---) e; e- \! W5 S( V0 c+ s
- [DBEXPRESS]
3 A H$ N! e, W# k" u - sqldir=mysql_sql, e/ S( M: D% C" v/ c% D) D! i
- Drivername=mysql
# h# _ _3 U! Z# m - Database=test
" r0 K: z! w/ j - Hostname=127.0.0.1
' O9 w% g/ L1 [/ a: K9 C - User_name=testuser: C. F# T) D" w! R! j3 t
- Password=my_password; E) U2 e: d( d- |
- GetDriverFunc=getSQLDriverMYSQL
+ U- O' M' u# l - VendorLib=libmysql.dll
) x9 q/ P5 y9 U. L5 J4 }0 b* p8 B - LibraryName=dbexpmysql.dll S5 }) B0 v* Z9 l
- Active=1
& I7 ?% F: U0 p; Q; `7 K. d8 y# k- F/ M4 S - ---example----4 e W* B7 p. r- W- l) ?
- - written 02.03.04 by pwk.linuxfan
0 a/ h1 q: l1 h9 B+ K+ I - 2 U1 c' H# E; `% f: i, j8 Y
复制代码 |
|