|
|
麻烦翻译一下,下面这段文章:xhan 8 t5 H$ G! }0 {, d8 m
( @3 J, r: l( v3 r+ c1 D' t1 e- & X' w4 n. I) O3 |" p4 x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 F$ E( p1 q* L0 f" N- ~' j# R h
" e% c- X0 Z" g* S. }' j- z- ### What we need ###! ?' J4 P5 k [7 Z; {3 c. ^
- Naturally, we will need a MySQL server to store the data for us, this document 7 X' z/ n* }! ]/ N* Q2 `; H+ R
- will not explain how this can be done - there are documents out there for the . g2 f" J0 q+ O4 r
- interested. The requirements include a (empty) database for TeamSpeak to use% i6 k: ^& y1 s9 ~
- and a user account (username + password) that has the permissions to do stuff. |6 ~& Z8 C- z' {8 C. h- Q
- with the database. Additionally, you will need a vendor library installed on the
/ r/ ?" B4 [( Q" T5 Z! O - local machine, this came with my MySQL install.( p% q) Z: R3 ^2 f
- These instructions will not tell you how you might transfer your data from the
4 B- P- Z: _. h* Z" N: ]6 { - SQLite database to the MySQL database, we start with a clean and empty MySQL$ h5 c6 ~9 D! ~: U6 Y! O) ^( c
- database.
& Q h' k" H' n - Some users have reported ways to import a SQLite database into MySQL, but at0 `9 d9 V. w6 @, ]* e
- the time of writing, there are still too many issues - check the current status
. q1 s, r) e) m! C1 I4 D/ y2 b - in the TeamSpeak forums if you are interested./ q6 t/ r; m6 S& i" d
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
3 {/ i4 L6 O7 T/ d0 H! J - Borland was used. This driver can only interface with the client library that . D& S! M5 I6 l/ @( S$ g/ y: k
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' ]' t2 _$ Z- v3 r - client library - basically all you have to do is to use a 3.x client library as
d s S" L6 P6 m7 W, | - "VendorLib" and a 4.x database to connect to.1 h, Z$ v5 S' a6 m/ `& k1 M7 L
- If you need more info about dbExpress, you can contact Borland.
: ?5 U0 Q2 t" ^6 s" i2 ~+ P0 e
0 B6 y Z- D1 ^% V2 Z( H: w8 i- ### Doing the work ###
' H. A5 o) R q' h9 o3 V ~ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. l, ?& x) O4 b" H: W3 C6 \ - the perquisites right, just open your server.ini file, and add this section at
. r$ b$ ~1 T7 M% K3 l6 ^1 @ - the end:
8 E/ P9 g2 p) ~( N+ k: F - ---cut here---
1 V q+ G- f4 R/ V - [DBEXPRESS]
4 y3 ~3 B" a( B( P. Z2 N6 C# o - sqldir=mysql_sql6 y1 Z1 |/ j/ ^: _8 W3 Z1 r& ~
- Drivername=mysql8 Y9 x( e [- R2 j9 }4 O$ J+ R
- Database=Your_Database_Name_Here
% R. S1 c, _8 ^$ g! A! \& G - Hostname=The_PC_the_MySQL-Server_is_on
( J _- _" P% N Q4 |2 u - User_name=User_name_on_the_MySQL-Server
( p; Y, w; R5 t - Password=Password_to_go_with_above_user_name
2 I5 r! z* J3 @# r; x9 J7 g - GetDriverFunc=getSQLDriverMYSQL
& {& `9 k" H5 g7 ~: l- T1 O/ s$ o - VendorLib=path_pointing_at_your_mysql_vendor_lib
+ I, G6 a) g/ L+ ?# b5 H - LibraryName=path_to_libsqlmy_libary2 | K+ y; e0 X2 n
- Active=15 j2 j* C% x9 _, ^
- ---cut here---
5 c( F$ E* o: q- w% Y+ W% B - In my environment (a linux box with a MySQL server running locally) I have:; h; ^* x. t7 N' l3 [
- ---example---& t9 N" U8 q1 e' B
- [DBEXPRESS]( Z9 x+ K8 u+ Z# {; t# i8 t8 B
- sqldir=mysql_sql
- S$ S1 Q, ~& c8 q - Drivername=mysql! z+ E6 h; T. S& Y, ^
- Database=test
U& T& j1 u0 y6 r0 m4 l, h8 ?1 h( K8 n - Hostname=localhost
" ?' z+ C& U. t: d+ q: L - User_name=testuser
5 h4 v6 w; z5 s! L# r \ - Password=my_password: T: C& N- w6 n7 |: R
- GetDriverFunc=getSQLDriverMYSQL
3 S- ~# r' s+ S+ i - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 D! f. O' ^0 e+ m
- LibraryName=./libsqlmy.so
" d7 H# B% _: F( e2 y4 S - Active=1
6 p/ z. F* g z$ ~0 c5 T - ---example---" C5 Z: H( u7 G/ S% G
- + s( ~( _( h6 ]
- On a windows box, also running the MySQL server locally, it would be:
8 j) \/ H1 o9 V0 _4 R! P" L& n+ \5 U# N - ---example---
" O0 Z4 x* Q7 j* Q) E - [DBEXPRESS]! W2 B, g- k. r8 ]6 x
- sqldir=mysql_sql7 U8 w; k/ u$ |2 }
- Drivername=mysql) x- E b% Q$ n. ?. N' W% R, ` C* L
- Database=test& S9 A* L, ]! o( S
- Hostname=127.0.0.1
0 n* ~: L. I2 l) F7 u4 s - User_name=testuser
- Q6 d& v1 \9 x: g7 W G+ N - Password=my_password$ K/ E5 q( s7 m+ A8 w9 k3 y
- GetDriverFunc=getSQLDriverMYSQL/ l4 i" ~3 u( { l
- VendorLib=libmysql.dll
) k$ Y6 |) Q r) o$ l - LibraryName=dbexpmysql.dll
7 s1 w4 x' i$ `' q9 I - Active=1; r+ e$ s' ? y/ A$ ~0 L9 N
- ---example----0 {6 }5 V+ l) J
- - written 02.03.04 by pwk.linuxfan, r9 e7 W j% |* e% \
- & h% q+ [) w( c# P) E3 J
复制代码 |
|