|
|
麻烦翻译一下,下面这段文章:xhan + a/ E, s' V* g5 s3 ^3 ~5 L
& C5 T6 t. a, n2 |- \1 }. J2 y- 0 r/ ?8 {/ H0 ^& ]
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
S( O# h% f/ i9 @6 L: I( w' P - 2 N) V4 L7 }) P( ~7 g
- ### What we need ###
" C) v! N( R5 h' z- Z - Naturally, we will need a MySQL server to store the data for us, this document 0 F6 i7 \7 X+ ~# |2 L9 {
- will not explain how this can be done - there are documents out there for the
8 U- D* x% o5 R6 ] - interested. The requirements include a (empty) database for TeamSpeak to use5 x( c1 F- G) f% ^
- and a user account (username + password) that has the permissions to do stuff8 t |+ B3 \3 M" p- t5 e$ N
- with the database. Additionally, you will need a vendor library installed on the
% @7 k: V$ T' v4 p: ~* g( X4 [4 u - local machine, this came with my MySQL install.
# a7 r$ `5 E J0 Z - These instructions will not tell you how you might transfer your data from the& Z7 b, O2 |$ d/ J2 r$ @$ c3 J0 s
- SQLite database to the MySQL database, we start with a clean and empty MySQL
% i3 Q9 m/ j" e - database.
/ _/ X5 ], W# d( ?0 g - Some users have reported ways to import a SQLite database into MySQL, but at
0 ~' C5 l% H& f2 ]: p$ Q9 u - the time of writing, there are still too many issues - check the current status
" N6 J% ?7 s+ y9 T0 m9 m0 z' s3 t - in the TeamSpeak forums if you are interested.
/ z$ ?: K6 r) U4 F: R - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ r/ o! K t7 P- B3 @4 D1 @
- Borland was used. This driver can only interface with the client library that
- k7 d) y0 H6 d& ~1 N5 @ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: p9 e# }0 I9 i - client library - basically all you have to do is to use a 3.x client library as $ x, X7 Z5 R K- T
- "VendorLib" and a 4.x database to connect to.
% g5 E0 Y# k' ? E5 Q( [! l( A" Z - If you need more info about dbExpress, you can contact Borland.
* C7 H% W2 A& ^( L% X - - _/ ^( v: A9 N' V
- ### Doing the work ###
0 m h: c( ~; ~0 D2 e1 v: w6 q. H6 h - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ L* s: L% v- n
- the perquisites right, just open your server.ini file, and add this section at* L0 A* h( j$ B+ t1 j
- the end:( _9 b* B. ^/ |: [& c
- ---cut here---
4 }7 Q3 ^6 `( I: d; ~# i& g - [DBEXPRESS]
4 }* V% J& y# w) O3 B - sqldir=mysql_sql' x9 a( ^4 l2 [
- Drivername=mysql- t( e8 L/ ?* B. |; R# X
- Database=Your_Database_Name_Here
4 K6 o+ H2 x: w8 x; O, }( ~ - Hostname=The_PC_the_MySQL-Server_is_on
- O" \' x0 ?& L# H0 L8 w - User_name=User_name_on_the_MySQL-Server& J& v& S% E! I0 g P3 q
- Password=Password_to_go_with_above_user_name
$ S8 x& |& p E1 r% n - GetDriverFunc=getSQLDriverMYSQL/ Q- w! p3 q* R
- VendorLib=path_pointing_at_your_mysql_vendor_lib
' A3 E+ F" _7 N, H7 O - LibraryName=path_to_libsqlmy_libary# M( H- S, k) T- M5 e
- Active=13 k5 P( e& n' F, Z
- ---cut here---
, M+ Y) e' y5 u! ?2 o - In my environment (a linux box with a MySQL server running locally) I have:
/ C( E- L" U1 N7 g" y4 F - ---example---+ P8 ~8 k' {6 p. I+ V! Z) Z. ?2 i
- [DBEXPRESS]* i. U1 c7 X: E& r! I" D4 h* x9 C
- sqldir=mysql_sql
& R; m& F5 B3 [ - Drivername=mysql
! N7 O+ ?6 ^/ m: h/ k - Database=test
/ y; x5 c5 z3 {3 {1 L, d - Hostname=localhost+ a( [) K a0 H p: {/ s+ H$ |
- User_name=testuser
: V0 z1 f% `6 ]" f4 C- J; e2 b3 @ - Password=my_password
& x7 V( ~7 E, l4 s( T - GetDriverFunc=getSQLDriverMYSQL, `* T% U4 ]' d
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
# H8 X% _, B' X+ [/ z - LibraryName=./libsqlmy.so! ]/ N- b; O3 n$ `' W) w
- Active=1
6 n0 z, u( B$ ?2 I" \/ d6 }- e - ---example---1 J, d q: ^5 H7 b G1 j7 X! T9 ^
- ) R Y5 Y, q$ V1 }0 b3 l
- On a windows box, also running the MySQL server locally, it would be:
( I/ k3 ?/ s4 u$ y - ---example---
1 L( D$ A6 A* U; _; }. g' B - [DBEXPRESS]4 }$ D3 h) s$ Q0 B$ Z$ Y' f- l0 f& q$ x
- sqldir=mysql_sql
! `+ W% W* c3 y6 m* X - Drivername=mysql
; H A" q' E) l- z0 ~) r - Database=test5 b4 _) @9 |2 U5 z+ \! q
- Hostname=127.0.0.1
- x+ G9 g z1 O/ n" W5 F4 | - User_name=testuser
# s# ^0 Y% h( q9 [8 {/ z( ^+ L - Password=my_password
g/ z, V2 I1 E7 w& d, l# ]- B# U - GetDriverFunc=getSQLDriverMYSQL+ H0 L" b8 @) C4 m$ K1 d
- VendorLib=libmysql.dll1 r4 Z# K) d0 Z! Z. u" X
- LibraryName=dbexpmysql.dll
+ b! c" C9 b, D1 D( H7 a7 r - Active=15 w2 s! H8 G- @/ i$ n
- ---example----
$ L" g4 E" O+ p( j9 T - - written 02.03.04 by pwk.linuxfan
, R- k8 T; \$ L1 r6 K - % m; l- Q0 @3 X I
复制代码 |
|