|
|
麻烦翻译一下,下面这段文章:xhan ( T& t" y" ]' l6 F: u
5 g5 H& w& _3 F# ^$ F1 c) X1 V8 p
- 7 |# D2 ^$ A+ I% }
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, @5 F; r' x5 z0 R
! N8 w- A5 x; Q; _- ### What we need ###6 A6 n6 `1 Z7 n$ n
- Naturally, we will need a MySQL server to store the data for us, this document , c( t2 A* }6 q2 U7 ^% \
- will not explain how this can be done - there are documents out there for the 5 D0 W- r7 O( z) I( A) v4 T! d
- interested. The requirements include a (empty) database for TeamSpeak to use1 Q4 j Q, Z2 m
- and a user account (username + password) that has the permissions to do stuff, v& ~7 y. r) `6 g) M
- with the database. Additionally, you will need a vendor library installed on the
8 ]% b1 ]: n+ x2 T - local machine, this came with my MySQL install.
1 c3 F( P+ V& T" I9 B5 ~+ k6 G1 L) {) e z - These instructions will not tell you how you might transfer your data from the1 P* C Z/ X9 \( [# n3 \
- SQLite database to the MySQL database, we start with a clean and empty MySQL5 U/ k* U3 \' S T- _
- database.9 \ F7 H- E) d3 Q) w3 g
- Some users have reported ways to import a SQLite database into MySQL, but at2 ]. \* ~1 G! p: ^3 o& K: K
- the time of writing, there are still too many issues - check the current status
! N T8 p7 ^+ w, O( `1 ^8 y9 ` - in the TeamSpeak forums if you are interested. C0 u, G* O2 l' ]
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 ^; g: O! K6 X! e$ v4 y9 i - Borland was used. This driver can only interface with the client library that / _/ S5 ]8 x" M' o
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
, G, m( M# C8 s3 p1 R( |. C- |- T - client library - basically all you have to do is to use a 3.x client library as
" \( [: X, R+ \" @ V- J- o1 w - "VendorLib" and a 4.x database to connect to.
' s8 S0 F$ w# ^) r - If you need more info about dbExpress, you can contact Borland.+ [$ T( D/ U/ g9 q" a
( O9 `; B( `& I; Z5 ?: `* ~- ### Doing the work ###
" t- M5 Y. f4 w$ W5 p1 n, M - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: e2 j0 U6 ]; N+ v% `: O* s
- the perquisites right, just open your server.ini file, and add this section at% W0 Q" O. r3 d' {9 \
- the end:
7 ?$ o6 n% T# [ - ---cut here---, o! F+ m4 s m% D
- [DBEXPRESS]
2 D. P9 d- }- H& A6 {; ?! ^, R1 j - sqldir=mysql_sql4 ? W1 n) Q' V" u( K4 C
- Drivername=mysql6 @4 K& x' ~, |9 O( c( z
- Database=Your_Database_Name_Here
' i; l6 e8 c2 D# z4 a6 M2 x/ t - Hostname=The_PC_the_MySQL-Server_is_on
0 @0 s3 t: g4 |! ^2 k" X& g - User_name=User_name_on_the_MySQL-Server$ A3 u3 l* d6 x, m7 u
- Password=Password_to_go_with_above_user_name
$ \+ I: ~4 P8 O - GetDriverFunc=getSQLDriverMYSQL3 c R/ N3 B& T1 D4 l5 L' G
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. \/ _% B$ p4 T( n/ N) {) U9 [! K" T - LibraryName=path_to_libsqlmy_libary
K" Y5 h) K+ I, | - Active=1
6 J# V: d4 a: _& l8 b - ---cut here--- M* j0 C" w2 O# v8 V- i
- In my environment (a linux box with a MySQL server running locally) I have:
1 f9 H( W4 C5 R( L& x8 w: _' } - ---example---
5 z4 w+ a( c: R( O! @ - [DBEXPRESS]- n% I# T+ o7 R5 `6 Q
- sqldir=mysql_sql+ k! ~& H1 {& a, g& Y
- Drivername=mysql
) E1 e( L( L- a3 f8 b - Database=test
1 }$ F2 i. J) J: |2 g, H3 b - Hostname=localhost/ c9 E7 h+ y8 P2 V8 c# E ^
- User_name=testuser c# N i; m2 i$ e
- Password=my_password
2 E9 u8 m" K x5 J/ ^ - GetDriverFunc=getSQLDriverMYSQL
5 U9 X H2 ~, X - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
$ Y$ H& X. ^; t+ T5 [ - LibraryName=./libsqlmy.so* s" K6 R7 u z% a/ y* I7 k
- Active=1
! H: r( `' O3 g' r" f, M7 s - ---example---- b6 v* T( A5 k1 p* w
N ^/ ^6 Q+ v! n; A8 t- On a windows box, also running the MySQL server locally, it would be:
$ c. \$ \+ D# a - ---example---; q( J( ^2 s4 \2 d5 Q
- [DBEXPRESS]
9 w/ j+ G- v! ^5 t% m7 j, v1 d3 o4 e - sqldir=mysql_sql
3 P+ k2 o: K b5 g" _* g8 Y2 E - Drivername=mysql
2 o% X) |, _9 L" ] - Database=test4 v% U- B2 E$ e* _5 t7 ^( X8 F
- Hostname=127.0.0.1
! E0 B4 G' w7 V# @8 L1 I' M r - User_name=testuser
7 w, P! @$ A8 T& Y0 @" p% S - Password=my_password& Y P% y6 v+ C
- GetDriverFunc=getSQLDriverMYSQL
H) G0 C! @ A3 j6 m* b: P - VendorLib=libmysql.dll5 @2 a/ B4 Q# ]' v5 n2 B+ u# W
- LibraryName=dbexpmysql.dll# q. |5 ^% S6 h" }
- Active=1
, d" A! j8 p; C" r' ^ - ---example----# j8 @ b4 ?0 e) c
- - written 02.03.04 by pwk.linuxfan
, U6 D" c. X* J7 K) J# ]5 o5 F
7 B- }% d/ T/ g* D; K! S
复制代码 |
|