|
|
麻烦翻译一下,下面这段文章:xhan
4 X$ }+ u$ @% P
) H9 L0 X5 v# L9 m-
; T; q3 N0 B9 E8 N3 C0 \; L - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: d1 y/ ], r& I3 G/ d% _# I - ; C6 W+ L3 J& z2 x7 X7 l {
- ### What we need ###
- F I* c4 {2 g3 u0 S - Naturally, we will need a MySQL server to store the data for us, this document
; d+ B/ N1 T& b, }9 {- {5 k - will not explain how this can be done - there are documents out there for the
7 D0 g- `' y- C; z# n - interested. The requirements include a (empty) database for TeamSpeak to use
( {, I3 i5 M" X7 k - and a user account (username + password) that has the permissions to do stuff
$ {( Y" D% m; w - with the database. Additionally, you will need a vendor library installed on the
- y# K% j2 [- p4 w! _ - local machine, this came with my MySQL install.
& Y# v3 ?5 P: ?& c `' a/ T- k - These instructions will not tell you how you might transfer your data from the
# z8 B- r. O/ l$ F/ O3 r1 A - SQLite database to the MySQL database, we start with a clean and empty MySQL! a$ B: W+ b# L
- database.
; v4 A$ C' ?# J; V5 [$ k - Some users have reported ways to import a SQLite database into MySQL, but at3 B2 G2 B# l) N. q# a
- the time of writing, there are still too many issues - check the current status
7 [# X- x/ z- v0 S- B! G - in the TeamSpeak forums if you are interested.
( J- K* d! f2 W; S - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* ?8 F* @0 Z1 ]% z - Borland was used. This driver can only interface with the client library that 9 F' Z2 `6 V* v! z8 |1 B5 {3 C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
1 `6 e Q1 ] K- f: c* i, i c% y - client library - basically all you have to do is to use a 3.x client library as
' z" E: w) u" |! i4 ?7 j' g/ a+ P - "VendorLib" and a 4.x database to connect to.
/ ?' A! { f: L5 j - If you need more info about dbExpress, you can contact Borland.# X: \' Y8 T6 {; w
5 u, ~$ a, p9 I$ w& Z- ### Doing the work ###) a# p% L+ @( ]9 _9 V0 j' Z/ ]8 k
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
8 m* s! Q4 z$ ~2 F9 [" o+ `, U - the perquisites right, just open your server.ini file, and add this section at; X2 I8 _, P8 i+ s" ^5 \
- the end:4 z T- X, G' p( _& _( f
- ---cut here---: S+ |1 ~3 _% W; m
- [DBEXPRESS]
6 W/ \2 s7 r( R# o - sqldir=mysql_sql
8 C# H& s3 Z; \ - Drivername=mysql
~7 G9 R4 r1 `8 g: T- ? - Database=Your_Database_Name_Here2 v! R. B. O0 v: a
- Hostname=The_PC_the_MySQL-Server_is_on
/ x: k* G. a' }: Y5 m$ I - User_name=User_name_on_the_MySQL-Server- ]8 J& [: x! E( C6 k2 U1 ^( P; G
- Password=Password_to_go_with_above_user_name
; \# v+ Z+ R. O9 w5 x - GetDriverFunc=getSQLDriverMYSQL- ^( a# z6 t+ O) |
- VendorLib=path_pointing_at_your_mysql_vendor_lib9 b- k( a/ b/ E2 O
- LibraryName=path_to_libsqlmy_libary
5 F- k6 A! i* [% X0 ~. m - Active=15 z9 f+ \4 \' L7 }6 S I
- ---cut here---
: \; d9 J2 \4 o: M! s/ m - In my environment (a linux box with a MySQL server running locally) I have:
( G! z& l t8 Y V% F: h - ---example---5 ^' _) J, \: F; B6 w6 u
- [DBEXPRESS]
" R& v$ M+ Q* G2 { - sqldir=mysql_sql4 p8 Y; t5 b* V
- Drivername=mysql
9 j( W; `2 I) z - Database=test1 B# m9 g: X! f/ f% k
- Hostname=localhost h* B! m0 G7 J1 ?0 z5 n
- User_name=testuser
7 x7 X6 `2 f3 p/ g6 _+ C - Password=my_password# Z$ P5 X o& v) L* z
- GetDriverFunc=getSQLDriverMYSQL
; x$ I9 ~8 c! ^+ {4 A$ H - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 V* q' ?/ X2 w - LibraryName=./libsqlmy.so
9 Q1 V; ~' r9 p; u* c- b - Active=1) s: v: \& ~* o2 p
- ---example---
2 C. ?* |, P6 y! S
4 J- m1 i+ _( q( ^- On a windows box, also running the MySQL server locally, it would be:
" v ? ]) L( K+ {+ Y4 N! @ - ---example---! |+ O7 |, ]9 l7 ^5 q
- [DBEXPRESS] M- X3 N, j6 U8 v" S
- sqldir=mysql_sql/ B4 _* ?3 M8 S
- Drivername=mysql
+ L2 \* x0 G7 a0 t* t - Database=test5 {, n% N0 f' `3 ?
- Hostname=127.0.0.1) `3 a* @. X% Y3 u
- User_name=testuser' d( x; Q2 O6 C
- Password=my_password
8 D; R$ J1 ^3 ?' x0 c9 d' V T: R - GetDriverFunc=getSQLDriverMYSQL
: t' d+ F# C5 f - VendorLib=libmysql.dll
6 ?/ ]2 R- Z- r, V - LibraryName=dbexpmysql.dll$ d! a6 s, q! o
- Active=1
2 `* w, U; c7 }4 \, N - ---example----6 j. R$ d/ m; O$ U
- - written 02.03.04 by pwk.linuxfan- Y9 t" x" y' o( c+ k
+ V& b4 v8 W, C0 P ]( D
复制代码 |
|