|
|
麻烦翻译一下,下面这段文章:xhan
, Q O- u& V! _9 `5 h% R8 M& U1 g- D1 q: b Y
- 4 a4 B9 K/ B- n
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 C* |- N( L( ?# u- T! G3 f" d3 b$ `# Y7 k - ' I7 W. o& X6 p$ \' j, m+ A
- ### What we need ###/ }+ ~8 x7 B4 K6 O3 u6 b
- Naturally, we will need a MySQL server to store the data for us, this document 2 K) l7 h, I' B2 a& X
- will not explain how this can be done - there are documents out there for the
$ L! w4 p5 s2 m. W - interested. The requirements include a (empty) database for TeamSpeak to use
" f) l5 \6 Z) z; y7 U6 f - and a user account (username + password) that has the permissions to do stuff
* o" j9 @6 L' {; X) k6 a - with the database. Additionally, you will need a vendor library installed on the
& P! W! H* } H+ H# ]6 A - local machine, this came with my MySQL install.4 ?2 E! v& K9 K: q
- These instructions will not tell you how you might transfer your data from the" a- m# ~6 d1 @) t5 Q
- SQLite database to the MySQL database, we start with a clean and empty MySQL0 z' y1 i' U$ ~9 E9 f, R! F6 L) g
- database.
3 j1 K( _3 p: `0 R4 V - Some users have reported ways to import a SQLite database into MySQL, but at9 x- Y3 }' c: Q! ~( C! G& ?
- the time of writing, there are still too many issues - check the current status' K& S" r/ t% m9 Z" C$ ^
- in the TeamSpeak forums if you are interested.) |7 v' q7 Q$ G
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
1 v& ~8 _& V+ O& r9 O4 u - Borland was used. This driver can only interface with the client library that
/ ^- x$ P; f9 r - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 K0 [6 N: M$ R' h2 x
- client library - basically all you have to do is to use a 3.x client library as
9 Y O! ^ L! |3 F; k- @6 [. v, q4 e - "VendorLib" and a 4.x database to connect to.
: c" h) h5 N3 m - If you need more info about dbExpress, you can contact Borland.# T8 Y- [& c2 R$ S- y
- 9 E! ~: a" @/ m7 k, X
- ### Doing the work ###
7 _' S( E9 |2 f$ Z4 S, {6 C - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ a: v3 x8 C/ r5 x' r; i6 U% q
- the perquisites right, just open your server.ini file, and add this section at
3 S! K, D8 h; X! m! m; V - the end:1 Y3 A5 T/ ]0 k i' M
- ---cut here---# Z/ a5 P( f0 z
- [DBEXPRESS]& y9 I1 [; e9 Q8 p) ~1 w1 g
- sqldir=mysql_sql+ [8 X' h1 J4 ?; Q% |( s- t
- Drivername=mysql
) P9 V9 F/ p3 d! l9 P8 L9 ^; b - Database=Your_Database_Name_Here; N, H7 B- l d! Z8 V/ u
- Hostname=The_PC_the_MySQL-Server_is_on
- F3 @4 j7 ^" L/ {8 i) o+ j - User_name=User_name_on_the_MySQL-Server
1 l3 K% {5 Z2 t5 {6 B3 e3 ? - Password=Password_to_go_with_above_user_name. G2 I) N) }+ K x2 t; g
- GetDriverFunc=getSQLDriverMYSQL9 {* _, u" x1 j
- VendorLib=path_pointing_at_your_mysql_vendor_lib
3 U* B3 I3 V5 ]* F* h - LibraryName=path_to_libsqlmy_libary
3 K! N, k5 f" X0 s m9 Y - Active=1
! C8 Q* y& Z, G8 _; P6 V - ---cut here--- G8 b' B% W. P
- In my environment (a linux box with a MySQL server running locally) I have:
/ j! z7 E$ G3 Q - ---example---
+ V* A: ?6 d, I6 l% R/ w - [DBEXPRESS]5 P% p% w2 r' A1 k8 O6 r2 R
- sqldir=mysql_sql5 R; U2 |3 o0 w2 f$ u' R3 }- y g
- Drivername=mysql" I- m$ i X0 ]9 @9 G+ Y2 O
- Database=test" k5 L5 ~" q2 A9 D* c
- Hostname=localhost
0 @/ F& {4 m1 N8 M7 n& ` - User_name=testuser x! Q# K/ {) o4 M' J7 C+ q
- Password=my_password
: w }9 h9 s4 {! i; W - GetDriverFunc=getSQLDriverMYSQL, n) Q7 d. A6 g1 m' m K7 _, \
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 C( K3 f/ L, n2 {) Z1 J: F
- LibraryName=./libsqlmy.so# E5 o1 m, ]- n) t5 U2 R/ b! @" {
- Active=1- P! ]% s3 o8 l( \7 G
- ---example---
) Z0 |7 V+ R6 d5 b' n4 {- f: s
" L8 O8 t* { `* f5 B3 W- On a windows box, also running the MySQL server locally, it would be:; Q* z4 x& M, d
- ---example---
X7 u' L) X9 a$ A' Z% Z4 x - [DBEXPRESS]* D! T; o) F1 |& s8 p2 s8 R$ ~
- sqldir=mysql_sql
" H7 z, o! d2 z - Drivername=mysql0 g2 ~+ E7 P1 f7 U7 O# o7 a1 c
- Database=test2 W3 P- W7 P9 ?' v
- Hostname=127.0.0.1
2 S7 C/ h7 g5 ~( d. S" p: Q3 ] - User_name=testuser
4 ?) G4 X* O& A7 R4 ^% ? - Password=my_password
+ d' x, Y5 ~, S - GetDriverFunc=getSQLDriverMYSQL
% w" Z2 |0 i, y/ K3 M) e& X$ t - VendorLib=libmysql.dll
2 t6 s. t# T7 d+ R8 V# j$ a3 [/ ?; S - LibraryName=dbexpmysql.dll0 I/ l6 N7 [" W4 H8 _
- Active=1
* c: Z& e; f% A ` e: m - ---example----8 J5 G- W$ J2 L2 I0 `" B
- - written 02.03.04 by pwk.linuxfan
8 W" o$ v( A! _ - & M2 m5 C; C% g/ b: H. s; A
复制代码 |
|