|
|
麻烦翻译一下,下面这段文章:xhan 0 k3 i! W( p8 ~1 i
# Q% Q9 i5 @2 _7 Q+ W- ' w& z% a. r. b7 h% Q2 f. X
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
6 i& V; d; e4 E. @ z. C0 u% Z - 3 l6 O, L. n/ j' h
- ### What we need ###2 r6 S( H/ x7 \ O9 {/ B# i
- Naturally, we will need a MySQL server to store the data for us, this document
, `! {9 s: w. } - will not explain how this can be done - there are documents out there for the ; `7 \0 t; ?8 e" k8 ^+ ~1 F
- interested. The requirements include a (empty) database for TeamSpeak to use
: ~ h8 f# B1 |5 D: U) r6 e - and a user account (username + password) that has the permissions to do stuff6 M6 @$ d+ w. Q7 G% h6 D+ w1 B% D
- with the database. Additionally, you will need a vendor library installed on the; f5 S2 e$ U2 o g
- local machine, this came with my MySQL install.
' I4 R: W# F3 ` - These instructions will not tell you how you might transfer your data from the3 {' e8 S K$ r; F) n+ h" d
- SQLite database to the MySQL database, we start with a clean and empty MySQL$ L5 O1 k+ M# ]( L# H
- database.8 T8 n8 a( O) e; ~' o2 q
- Some users have reported ways to import a SQLite database into MySQL, but at
/ u. L. Z6 o! C6 {; n+ B& _) K% i - the time of writing, there are still too many issues - check the current status/ j& v$ L/ K, |* P" d& J: V" z
- in the TeamSpeak forums if you are interested.2 m/ n" n6 ?9 G0 g
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 W: q+ U9 g, z( M; M0 k2 l- H - Borland was used. This driver can only interface with the client library that . @& K% D7 ^) ^% {6 D
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this( Y! |+ B! F1 t2 z3 K
- client library - basically all you have to do is to use a 3.x client library as . F9 |1 U& T0 e9 E5 K# h
- "VendorLib" and a 4.x database to connect to.6 Y2 z8 |5 Z" a1 K' O2 E
- If you need more info about dbExpress, you can contact Borland.- J( p- o7 J" Z9 S6 A7 v
- % i' C, ~0 Z* T E* d; [) I
- ### Doing the work ###
: _7 ]) c/ x: H* i" ` - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 ^8 f# D2 l' H: Z
- the perquisites right, just open your server.ini file, and add this section at% h6 A- @8 | r+ Q% C7 i
- the end:
% V/ }. h, E5 V0 X! e3 q - ---cut here--- J9 }. \+ S' o1 A$ p
- [DBEXPRESS]* a% T( r8 R, r. Z9 d4 |7 W
- sqldir=mysql_sql
+ `3 n4 U. n2 @ - Drivername=mysql0 S* z/ Q n( J
- Database=Your_Database_Name_Here! l7 K# o3 s4 j7 m4 p- ^
- Hostname=The_PC_the_MySQL-Server_is_on
4 B2 K# d) L3 Z9 w9 { - User_name=User_name_on_the_MySQL-Server
8 w0 ~1 k, \6 o- Y# ~3 [ - Password=Password_to_go_with_above_user_name
. n" F! y0 O4 j6 g2 F - GetDriverFunc=getSQLDriverMYSQL
2 `( S2 b( n9 l) T - VendorLib=path_pointing_at_your_mysql_vendor_lib
9 X* ^. R5 L& x1 C" B - LibraryName=path_to_libsqlmy_libary3 Z5 ?8 y) L2 Q6 u) `) }% } T9 r
- Active=1
. Z# [! o9 i n- p8 f5 d- n/ m* Y - ---cut here---
! A( ~$ W- L( Y0 w$ x - In my environment (a linux box with a MySQL server running locally) I have:
" P# c& F5 G$ |( \ - ---example---
; d; g, W4 ^: g( a% S - [DBEXPRESS]+ W/ u2 Z! q m! R! C X; I
- sqldir=mysql_sql- L2 o% C5 l5 R6 E' j
- Drivername=mysql% q' Z; ~) H( U
- Database=test
. m. P" E4 b5 C$ S - Hostname=localhost" z' u0 d+ ^( A) G5 Z
- User_name=testuser
/ ?9 W4 D% S3 ^ u, d - Password=my_password
5 z" \% \" I7 H0 ] - GetDriverFunc=getSQLDriverMYSQL7 g" U2 S) C- L
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( g( o4 r! ^" v) { - LibraryName=./libsqlmy.so
* o) g2 R ^' O [ - Active=1
7 P6 R- u5 R3 A* n& f) k - ---example---: Y+ V& c( X/ h* Q7 z
- 2 f% u2 o, a* T# j
- On a windows box, also running the MySQL server locally, it would be:* D6 I8 K) c6 C; d" L& e; ^! A
- ---example---) f6 r7 x5 W7 R1 V4 o% Y, S$ i
- [DBEXPRESS]
7 V' \, x. J/ v6 N% r6 y/ B - sqldir=mysql_sql
# v, ]5 \1 q& S/ V* L5 B - Drivername=mysql
( [4 o( i9 ^. P: ]# D - Database=test, F2 v( O- G n9 s
- Hostname=127.0.0.1$ u( J! o9 w b( M$ K+ G
- User_name=testuser: r" V! z ]7 I0 S# u
- Password=my_password
5 C) G6 }. v( I( I - GetDriverFunc=getSQLDriverMYSQL& @, J( n- U4 E) [8 {2 b' o
- VendorLib=libmysql.dll/ H2 U6 I; u( t% _+ [& r" o
- LibraryName=dbexpmysql.dll
h8 R" W: e" e5 b5 b! m1 r - Active=1
+ o. w; M5 d" { - ---example----
; `( C* q- d3 u/ { - - written 02.03.04 by pwk.linuxfan+ l9 M7 } ]* ?, p( m) c3 r9 @
- F4 H+ }2 a% R( R0 P
复制代码 |
|