|
|
麻烦翻译一下,下面这段文章:xhan
+ ]4 s% u2 b, V3 H# x' ]+ b+ d$ e5 u* r- Z$ F
- - C% u; l/ Q. V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ i1 e& @9 ^/ P7 x1 I
- + D" B! w; E! L* j$ E: e: w
- ### What we need ###1 y9 u. K* ^( Y& w0 C! c* D- V
- Naturally, we will need a MySQL server to store the data for us, this document
( _8 ~3 F2 l5 B. t. } - will not explain how this can be done - there are documents out there for the 9 }6 H! _8 p, q: u! g
- interested. The requirements include a (empty) database for TeamSpeak to use( c2 m, Q9 S7 |1 R" a/ Z
- and a user account (username + password) that has the permissions to do stuff; Z9 X) b7 p" Y" a2 `
- with the database. Additionally, you will need a vendor library installed on the6 P' a0 e( ~; X. X* |% P
- local machine, this came with my MySQL install. I, r) R# J( |/ W+ @
- These instructions will not tell you how you might transfer your data from the4 H- J! @6 _* \, F
- SQLite database to the MySQL database, we start with a clean and empty MySQL# f) Q# z, j& q% Z; d; f5 P
- database.
1 T6 j/ s5 {5 K( Y - Some users have reported ways to import a SQLite database into MySQL, but at. D% W1 p2 o5 A: v8 s4 N
- the time of writing, there are still too many issues - check the current status1 K8 Z8 d: I. `
- in the TeamSpeak forums if you are interested.
k: r& @( V8 M! i - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) m" x6 ~5 J+ {/ Y
- Borland was used. This driver can only interface with the client library that 5 ?5 p, W! V% C( n I" l* b
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this( C! l8 ^( W' o: ]
- client library - basically all you have to do is to use a 3.x client library as
2 y* `8 T% |* n- U - "VendorLib" and a 4.x database to connect to.; M' \5 b& X5 N5 k2 P. i
- If you need more info about dbExpress, you can contact Borland.3 c5 K z: x5 t/ O! L) {, r
$ E. M) Q/ i$ D8 s0 t- ### Doing the work ###/ F/ ]+ b+ o) I" b' [
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
% g) Z, P' f/ c - the perquisites right, just open your server.ini file, and add this section at4 x" T7 e. y4 z6 g( s4 T, `
- the end:
) ?+ C) ]. T$ a; z0 q - ---cut here---: Z7 c+ X s! G, h7 |; p* S
- [DBEXPRESS]
| L( V9 n4 ?4 I! X. U - sqldir=mysql_sql
; a- H1 u, C0 c( O5 J/ e - Drivername=mysql
" n; m E$ g5 d D! u+ Z' m) Y - Database=Your_Database_Name_Here
7 T( x0 j8 Z6 K. U! Q - Hostname=The_PC_the_MySQL-Server_is_on3 q% b5 n6 T8 H: w; N$ g
- User_name=User_name_on_the_MySQL-Server
, H0 N/ M& Y' R0 s2 k7 _9 \ - Password=Password_to_go_with_above_user_name
* P1 R1 U4 O) h: [ l1 O0 m* o1 p - GetDriverFunc=getSQLDriverMYSQL4 e% A9 |, o. A) F0 N
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ x- d5 K1 z; r/ X0 d% U - LibraryName=path_to_libsqlmy_libary
' I4 o( a" q4 O4 |1 S4 R - Active=1
/ |% y" n1 i; i - ---cut here---- \5 f4 k" t/ Z+ F! k
- In my environment (a linux box with a MySQL server running locally) I have:, T4 q# q% ]- f% o5 u' W
- ---example---
) M# o9 Z: W( `" R) ^ S - [DBEXPRESS]
S! C) i1 W4 u) ~# ~& W1 N - sqldir=mysql_sql
5 X3 H: _3 d1 W8 [! L9 a/ Z - Drivername=mysql
P: u* x. I) y+ T8 ` - Database=test
. T4 h; s* a8 q' { - Hostname=localhost
# N- z8 H! P# ]& k# l b - User_name=testuser! T5 X b9 b- d- K
- Password=my_password
. `8 R: \ k' _. R. N$ u. i - GetDriverFunc=getSQLDriverMYSQL
: p% P4 ~+ r0 @ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
^2 Q2 [9 N6 ^ @8 f+ g - LibraryName=./libsqlmy.so& d6 _; p& P" ^. ]
- Active=1( | S& J' W E5 _) P: Q; J
- ---example---
! ~% E+ W# z2 o; h) C3 u' o; l' g! S
: B+ M: g, E$ p, C* u7 B( A- On a windows box, also running the MySQL server locally, it would be:, z3 k# l" ?* m) j6 C" q* g* |
- ---example---
' P% [5 k! ^1 o. u7 e. L* d4 H - [DBEXPRESS]: d7 x5 I) S/ a- o4 U
- sqldir=mysql_sql
; X1 Y% p( l/ Y8 ?7 b1 h - Drivername=mysql# C4 w, k! Y& b
- Database=test2 b1 ~5 |6 X; b' Z) k
- Hostname=127.0.0.1/ S5 h8 e2 e3 |+ r2 j0 K
- User_name=testuser; ]5 ^! S* H6 L' L1 x+ w
- Password=my_password8 U1 g. K. j6 ^- R3 b- v
- GetDriverFunc=getSQLDriverMYSQL& D: G8 Q; d' J, S3 H
- VendorLib=libmysql.dll
. a* F- a( c2 O. }) p - LibraryName=dbexpmysql.dll$ l' Y: |* H" X2 }
- Active=1& V' f! f8 G4 @5 M' K V: i
- ---example----
7 Y/ t" w: U$ ?, L" G0 c, Z! } - - written 02.03.04 by pwk.linuxfan* O* c Q& {4 h6 N1 R, M) ^
4 X5 j$ g3 C ^0 M# U; X1 l- J
复制代码 |
|