|
|
麻烦翻译一下,下面这段文章:xhan
" W9 Z2 d2 O( k( Y6 _# N$ J
`/ i; F! g A6 U `7 {, k5 z- 1 v( q1 ~7 w5 s. G. @
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ V) U# ?5 F' |; I; z0 X
- # I1 o( _! d u
- ### What we need ###' N& R& E& F6 C% l
- Naturally, we will need a MySQL server to store the data for us, this document
3 R5 S8 |1 R' K$ N- ~ - will not explain how this can be done - there are documents out there for the 4 G% [( ^, k- U
- interested. The requirements include a (empty) database for TeamSpeak to use! u' G1 S; M) r7 S
- and a user account (username + password) that has the permissions to do stuff
( ~/ P' G% s, F0 `+ l/ y3 T - with the database. Additionally, you will need a vendor library installed on the, f, B z, [4 W/ R% ^" t
- local machine, this came with my MySQL install.
) S' ]1 o+ M. C) p: n! K+ f7 \6 o/ \ - These instructions will not tell you how you might transfer your data from the o6 {8 R- f2 {* j B" d6 L, m
- SQLite database to the MySQL database, we start with a clean and empty MySQL, @' @3 C+ t% k, c
- database.
( s* I: c V2 |; w4 P/ Z - Some users have reported ways to import a SQLite database into MySQL, but at' \6 r* p! N, S) D: r( Y# ^
- the time of writing, there are still too many issues - check the current status2 V* H; `5 u! Q
- in the TeamSpeak forums if you are interested.
, o; ^- J+ i! H5 E) U8 _. K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% |+ y. z. c! o0 b! A
- Borland was used. This driver can only interface with the client library that
7 u- n0 s; S; W/ p9 z$ y - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
- o& n# `! d* _ l: x9 z - client library - basically all you have to do is to use a 3.x client library as % O" Q+ \. J1 c4 ]3 q# N) j! E
- "VendorLib" and a 4.x database to connect to.
8 }% v% v" c' _. M - If you need more info about dbExpress, you can contact Borland. G+ O5 k7 R3 L9 V
' c6 D6 U$ s. m/ g: R: m- ### Doing the work ###2 Z/ z% k9 N3 [3 Y6 {' c# Z4 O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ s s6 b o5 ?' \3 M# N- M% A5 K - the perquisites right, just open your server.ini file, and add this section at
, o* r& U+ F5 o. O* _' m - the end:( X9 T1 z9 l6 x' C/ [5 J, Q
- ---cut here---( l/ y/ Z7 G$ o% M0 _
- [DBEXPRESS]
0 e! p- j, o6 f3 J - sqldir=mysql_sql
; X2 J7 w; B3 }+ U# Q - Drivername=mysql
2 v4 I6 i4 }( z% M8 Q - Database=Your_Database_Name_Here
( r( m( L' `/ e3 R; g& u+ A% j - Hostname=The_PC_the_MySQL-Server_is_on. _, K% L. q: }
- User_name=User_name_on_the_MySQL-Server
( g# g4 d+ s$ I- j9 P( r& y - Password=Password_to_go_with_above_user_name
' X! U/ L! n# @$ s1 s- ~ - GetDriverFunc=getSQLDriverMYSQL# X& I( `, r+ u3 n5 c
- VendorLib=path_pointing_at_your_mysql_vendor_lib
# l9 n+ `3 c0 t5 C$ r5 `! |9 I" V - LibraryName=path_to_libsqlmy_libary
1 j3 Y- c; w' ] - Active=14 E# y7 ?& v! l1 d) t
- ---cut here---- I a* |8 m- t
- In my environment (a linux box with a MySQL server running locally) I have:
) A- ^8 Y7 k" ]+ M5 j3 e - ---example---
! [) I4 Q g9 s" z+ U - [DBEXPRESS]& a. V: _7 I0 i1 J4 I
- sqldir=mysql_sql
2 [$ u- u6 c+ q4 _9 P' C - Drivername=mysql! n7 u* h: ]& R! |0 z
- Database=test
, x0 M! `" I0 @5 H' l) B0 B' s0 @ - Hostname=localhost
; q6 ]/ K: n' C a! S$ ]; ^7 o! c - User_name=testuser
, @7 `" W$ }5 G. H. T* J& q* X - Password=my_password
3 q* S2 B; \: h) p8 h - GetDriverFunc=getSQLDriverMYSQL
- u1 a9 I u+ h* G5 E' G - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
4 N* B$ j8 a! b5 m3 Q' p. q - LibraryName=./libsqlmy.so
- N6 v) R2 D6 t' y, ? - Active=1" C/ |* B0 {0 Y8 F. Q8 p' a5 ^8 E
- ---example---% C5 M" k+ j, b4 `* @, E
& \+ f- ^* S- m- On a windows box, also running the MySQL server locally, it would be:0 _9 M/ z9 D2 a: V' T
- ---example---
* n+ D/ d& c! }+ |+ v6 D2 I( O& `5 I) a - [DBEXPRESS]) \' y1 R: k l$ S! v
- sqldir=mysql_sql Q3 a4 g- J7 G" M. g) K1 {; {
- Drivername=mysql7 [% X8 [7 U8 O+ x" K
- Database=test
8 ]' h4 @/ l# k6 D) j1 S: z - Hostname=127.0.0.1
3 l+ b4 y$ a5 G& q* l7 m- T/ [ - User_name=testuser
& X# Z1 H) R; q- U# y& p - Password=my_password4 f+ s% z: `+ l% E6 x* N; W
- GetDriverFunc=getSQLDriverMYSQL8 V8 w$ x. J* P6 [$ R C2 N
- VendorLib=libmysql.dll. g+ v* C8 w7 V+ ]$ \
- LibraryName=dbexpmysql.dll
w2 O" s/ N; ]/ Q7 d' {5 f - Active=1' e4 S, N# L# @# h. X
- ---example----# l' t+ `; A/ F( b2 k) n3 ]5 a
- - written 02.03.04 by pwk.linuxfan" @8 T* g% x2 m1 s% a
- 0 ]/ Q l6 E) H0 k- L( R! o
复制代码 |
|