|
|
麻烦翻译一下,下面这段文章:xhan ) s, j7 }! Z7 s" v0 T
- a P2 U' e# z+ v4 r% s1 N- % S1 s0 V8 R8 j' } G
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######+ n4 ?7 |, w3 G E8 g
& G7 `2 f; M/ {! Y( Z. N1 ?- ### What we need ###5 O. o4 u1 {' }% z, H
- Naturally, we will need a MySQL server to store the data for us, this document
" [6 b: y) s) B( H7 v( D! \ - will not explain how this can be done - there are documents out there for the . Z0 ~! r, V+ x$ [ v& P; I
- interested. The requirements include a (empty) database for TeamSpeak to use7 ~3 S5 P K* O; U( V3 S, R& w
- and a user account (username + password) that has the permissions to do stuff" u& l" y6 I7 U+ p1 D) o! ~$ z
- with the database. Additionally, you will need a vendor library installed on the/ g; o8 A, F! e
- local machine, this came with my MySQL install.7 {% Z9 z) j$ Z3 p
- These instructions will not tell you how you might transfer your data from the# ^8 \$ y/ l; R/ Y
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 g- I' v" M# ?) Z) a6 S+ ? - database.' Z# s, m+ C+ |% O
- Some users have reported ways to import a SQLite database into MySQL, but at. b: I/ n1 S- Q* {
- the time of writing, there are still too many issues - check the current status
. Z* M/ o& F: o; @' c2 m7 s! B - in the TeamSpeak forums if you are interested.
2 T9 e) z* L" M/ r( t$ m - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 B$ V# T q& k( O0 P. [
- Borland was used. This driver can only interface with the client library that ( B/ k9 x' L( G; O1 s
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# } }7 A p5 [
- client library - basically all you have to do is to use a 3.x client library as ! n8 Q8 D+ \( Q6 d9 q
- "VendorLib" and a 4.x database to connect to.; h0 c( E: h: e
- If you need more info about dbExpress, you can contact Borland.3 F% S) c% J) m; J" }; ^* h/ {
}7 j3 [* f0 n6 l6 X0 U7 q- ### Doing the work ###
* l1 F, w5 p; ?. d* [ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ C: C* D6 a9 R p
- the perquisites right, just open your server.ini file, and add this section at" U3 q' l9 a* G/ O: Z3 @
- the end:
/ o8 z2 }6 P+ i' h - ---cut here---
+ |0 ]8 T, W. V0 p4 y# W - [DBEXPRESS]8 b; y1 ~' x+ M5 y- Q4 O
- sqldir=mysql_sql
& c" T! a( o; ^6 O2 q+ M - Drivername=mysql
7 F- S* g6 T( l, ]& Z8 v v( ?. ` - Database=Your_Database_Name_Here3 C4 r R% a! l% G5 ^+ n% t" ^
- Hostname=The_PC_the_MySQL-Server_is_on. z8 S9 b+ K2 ~- f' @, s
- User_name=User_name_on_the_MySQL-Server( M! e5 \8 f9 ?) h8 p( [/ ~
- Password=Password_to_go_with_above_user_name$ q- [4 {1 o4 U0 P. o+ Y ^
- GetDriverFunc=getSQLDriverMYSQL
/ {9 K6 X6 o7 a - VendorLib=path_pointing_at_your_mysql_vendor_lib, e9 U+ S* ~* D+ c4 d, o
- LibraryName=path_to_libsqlmy_libary3 o. _; Z1 y8 M, W; U
- Active=1
/ ?* X2 u3 y0 D* r& c% b' B - ---cut here---# q* Y3 }8 ]9 r
- In my environment (a linux box with a MySQL server running locally) I have:
' i. ?- U: t0 y S7 }4 @* Y; k - ---example---' j3 ^' Z( R. r4 _
- [DBEXPRESS]
7 x @. m' [: I) y3 P- ]1 y* c4 s - sqldir=mysql_sql
$ ^' r" |: c# H8 P) i - Drivername=mysql
) k9 a" V) p! N8 E+ U* E0 y4 J - Database=test
: L9 r: B9 H/ D1 I! l - Hostname=localhost! w- f+ N p% f: G: q Y2 ~4 R
- User_name=testuser
. d5 a& S0 M0 D3 t, b$ V - Password=my_password, L6 Q2 W7 m% o: J8 }- j+ D
- GetDriverFunc=getSQLDriverMYSQL
% i& q& j/ o/ K; i - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 V0 I( M+ T* y& x L6 E. L - LibraryName=./libsqlmy.so9 }% i) S! U# M) v5 ?% ~+ E9 F
- Active=14 G( A. o; d D- m% D# T
- ---example---
! }9 `) B ^1 R2 H& S& B* b - 3 K3 `6 W9 E6 _; |3 ]) ~
- On a windows box, also running the MySQL server locally, it would be:
5 O8 m, Z5 T' Q1 r - ---example---
5 v, V7 J& w9 ^9 b7 F5 ^# l d - [DBEXPRESS]& ^" |4 b1 A9 l9 n
- sqldir=mysql_sql7 z- l$ H1 w8 {
- Drivername=mysql
# v, s6 H7 z/ r8 U3 T1 Y$ H5 } - Database=test G( x4 _& T( f# [0 _9 R# b! Q- R
- Hostname=127.0.0.13 P# Z! Q1 ~2 C% X
- User_name=testuser
# e- V; j& M6 @. A( m* G - Password=my_password6 F" Y! o6 ?7 |# }8 h8 l& z2 g/ ^
- GetDriverFunc=getSQLDriverMYSQL
7 b5 }6 Y8 K/ o: c' c - VendorLib=libmysql.dll3 [/ [0 u& r* t& w
- LibraryName=dbexpmysql.dll5 R' k8 L4 D/ ?* ?: b
- Active=19 f7 l0 l4 p. }" V
- ---example----
: l% D& Q" E) s+ U5 S$ s; F - - written 02.03.04 by pwk.linuxfan, A( d1 X( N8 x6 q
- + K% d0 J' b# Y
复制代码 |
|