|
|
麻烦翻译一下,下面这段文章:xhan # ?: H2 |4 g. j$ p1 M+ C
! g/ [1 |' Q$ h! w$ W* I% v
-
; a/ b; Y8 q* l- U( ~8 E - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
5 {. F$ z! }1 C* L
6 k8 M) ]. ?4 n) N- ### What we need ###7 H: I3 b+ y' H) T2 U M: r1 `6 q
- Naturally, we will need a MySQL server to store the data for us, this document
; ]! C+ ?9 _8 O) M7 q; Z - will not explain how this can be done - there are documents out there for the
# C, k$ Q* \7 ~2 B4 P - interested. The requirements include a (empty) database for TeamSpeak to use/ q, w# d8 q/ N
- and a user account (username + password) that has the permissions to do stuff
$ T: M9 N3 ^" S8 f# @ - with the database. Additionally, you will need a vendor library installed on the: |( B* r5 q4 N: c- q8 q0 c
- local machine, this came with my MySQL install.& T, q4 l* c$ C. B' d* k
- These instructions will not tell you how you might transfer your data from the/ g$ V+ a& ~& v, B% f2 V1 C# U
- SQLite database to the MySQL database, we start with a clean and empty MySQL
7 ]/ J. O; S4 x6 C - database.
# D4 H8 i) m. ?4 n% @ - Some users have reported ways to import a SQLite database into MySQL, but at& A, B/ W8 c Y
- the time of writing, there are still too many issues - check the current status
/ I6 s7 k- ?* z& O - in the TeamSpeak forums if you are interested./ s+ }# I0 Q3 \5 O
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from5 W6 q0 d! [# ]$ A2 I, W# N
- Borland was used. This driver can only interface with the client library that
* j& E$ E; C8 ^, x" T - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# H( t5 |( i, a* ~3 _
- client library - basically all you have to do is to use a 3.x client library as ' u- b' d3 Q' E4 J X* Z
- "VendorLib" and a 4.x database to connect to., J8 [0 Z/ z5 x- r" j
- If you need more info about dbExpress, you can contact Borland.4 K) d( D( y' c G
' | H8 K" p: q! s- ### Doing the work ###
}' H4 x9 ]# o - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ ^: I3 w/ h! q* M
- the perquisites right, just open your server.ini file, and add this section at
G: N" J/ m( j( H& X - the end:
$ O$ n) H% o* d7 N - ---cut here---
) _- F- J3 V! J( C M - [DBEXPRESS]
! g8 y9 U3 o0 T1 q3 o+ q - sqldir=mysql_sql4 d: J$ _4 z3 o: s
- Drivername=mysql7 f7 h, B; Q3 j& H
- Database=Your_Database_Name_Here- Q# l) G# k H! z
- Hostname=The_PC_the_MySQL-Server_is_on
% @/ r7 A: T' N" `7 B, J9 V' V1 j& u. ? - User_name=User_name_on_the_MySQL-Server( G3 ?. W- m. L) a$ _6 I, K- ^8 g) C
- Password=Password_to_go_with_above_user_name- L. U/ f1 D2 d9 `
- GetDriverFunc=getSQLDriverMYSQL
, u0 R$ {9 T. p/ @ - VendorLib=path_pointing_at_your_mysql_vendor_lib; U% T% @& @; |' x
- LibraryName=path_to_libsqlmy_libary
# N6 a/ T* \6 S" L - Active=1
& p: `3 F. x( r - ---cut here---
$ D; s4 P7 D$ r0 Z - In my environment (a linux box with a MySQL server running locally) I have:
1 P% q: v# O8 X+ A9 F Z/ A - ---example---
, h* a. H+ i! N& z- G; T0 H: Z$ } - [DBEXPRESS] \7 X$ z- h8 d0 W+ @ N
- sqldir=mysql_sql
2 E% O' \ Q/ a# H- O2 f4 x" \ - Drivername=mysql
, T7 E' b/ J; @" e0 e. | - Database=test
+ E# n5 `5 E7 Q Y- K" ~* a" g4 Y" P - Hostname=localhost
% p% Z- C( Z; `! Z - User_name=testuser; X5 u( v( N- S% Q
- Password=my_password3 l8 x# n. s0 Z& w1 U
- GetDriverFunc=getSQLDriverMYSQL
0 d0 A* x1 B/ {4 S# Y" _ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- I1 Y7 m5 ]% _1 w9 ~: L' s
- LibraryName=./libsqlmy.so
' @$ R5 M- _' s( Y6 P+ C1 p/ _% S5 \ - Active=1
, X% X# i1 O: L* d! }7 T, d7 I - ---example---
1 x) v1 Z5 @* U0 b - ' g; f. [4 t: j# ?* M: @* {7 w
- On a windows box, also running the MySQL server locally, it would be:# [$ g3 O1 c5 c, O0 z; x* F+ J0 {
- ---example---# [# L* @0 [) P z( t( L9 ?
- [DBEXPRESS]6 V7 ~" I5 ]& |! k1 @7 N
- sqldir=mysql_sql: e! [0 O( ~1 k7 Q4 x6 e* J
- Drivername=mysql
) K# i0 J. H' a( b$ q! d; l* y - Database=test
1 x8 T( j4 \/ c( T+ L, ` - Hostname=127.0.0.14 F- m, P: q3 G1 t/ t* K% g
- User_name=testuser- E4 Y" N9 ^2 Y+ l4 ~# b. d$ [
- Password=my_password
4 u( }' Z- P Z& N - GetDriverFunc=getSQLDriverMYSQL
. |0 l4 T3 `. p' X7 ?: }. @ - VendorLib=libmysql.dll( D& E$ Z4 |- L& \
- LibraryName=dbexpmysql.dll2 e `0 _8 P2 ]6 J
- Active=1( v4 c2 c: K4 h2 g, v6 b
- ---example----! o, U; @5 L, v# a a
- - written 02.03.04 by pwk.linuxfan
n; d6 h: J( S Y! k - ( {- o* i5 A! Q# Z) @ Z0 x
复制代码 |
|