|
|
麻烦翻译一下,下面这段文章:xhan 6 g; y3 b; | G
$ u0 ^8 ]1 h: w! f3 l-
1 o3 B( i, B+ q% G/ J7 W - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 h4 z3 d2 D2 I
* j9 T5 b ^( K& l3 P9 }! T- ### What we need ###
6 G: s' R+ j+ j* L" J W7 a$ s - Naturally, we will need a MySQL server to store the data for us, this document % g" C" y/ I+ }9 H- v
- will not explain how this can be done - there are documents out there for the {* B* z7 T3 m
- interested. The requirements include a (empty) database for TeamSpeak to use9 k% `% G' t" N* M' s" G& H
- and a user account (username + password) that has the permissions to do stuff
; K- v7 [3 M5 H9 y) d5 u4 G9 Z - with the database. Additionally, you will need a vendor library installed on the; y5 M5 x& V, H) d6 I( |2 a
- local machine, this came with my MySQL install.
/ l5 Z( z9 B( r% k' q - These instructions will not tell you how you might transfer your data from the
/ ~" |, P5 }. n) U- a - SQLite database to the MySQL database, we start with a clean and empty MySQL' p+ B6 _; l6 n) S$ r
- database.) n+ z4 Q! F7 x$ Y; L
- Some users have reported ways to import a SQLite database into MySQL, but at
# q; t4 P* E) a. h0 } - the time of writing, there are still too many issues - check the current status
3 T* z O& p' A4 ^ - in the TeamSpeak forums if you are interested.( b1 c9 ?: A2 L, n. K$ E
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) s2 u* Z7 Y4 x2 I9 E, |1 o+ @/ Z5 ] - Borland was used. This driver can only interface with the client library that ) e. [5 {# e+ J! \# A8 `% t2 W# c S
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 k" L; E+ f) U( q0 x$ ?
- client library - basically all you have to do is to use a 3.x client library as
1 r! S" t* ~- u# o. Y - "VendorLib" and a 4.x database to connect to.( E9 g2 w- A! ]' ]! K [& }" o) _
- If you need more info about dbExpress, you can contact Borland.
7 M3 Y0 L/ `8 H; b! I& r - ) w6 i% n: S) i: e/ _
- ### Doing the work ###
8 i$ p; v3 ]. Q" o+ w - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( B$ n) ], ^) f0 G - the perquisites right, just open your server.ini file, and add this section at
2 Y! _3 Q9 B: B- H, A8 v3 @ - the end:
7 V4 a$ a* O2 l6 l% L0 m - ---cut here---
' R; S# F1 \; G$ b - [DBEXPRESS]
* l9 P1 H, E! i( O, A6 o2 p6 T - sqldir=mysql_sql' V/ d. R( c0 \* w" W1 [4 m2 Y
- Drivername=mysql% [2 P: U* Q! x" @2 ?) f: `
- Database=Your_Database_Name_Here
1 m3 U, U- c2 r* ] m- F# C7 W - Hostname=The_PC_the_MySQL-Server_is_on
0 V: b+ A2 c1 n& t0 a5 W - User_name=User_name_on_the_MySQL-Server& D7 V% d$ w' \7 i. F! Y
- Password=Password_to_go_with_above_user_name
1 `: Q2 T1 {) M- p) Z - GetDriverFunc=getSQLDriverMYSQL- I+ {7 [4 w) C/ x
- VendorLib=path_pointing_at_your_mysql_vendor_lib. G/ @" r$ s9 V0 O0 D- b
- LibraryName=path_to_libsqlmy_libary' P& @6 \" [ ?6 ]* ^; g/ p
- Active=1
' C+ e$ ]# @+ K - ---cut here---
$ Y8 t9 |" L" S* ?7 `, \$ R - In my environment (a linux box with a MySQL server running locally) I have:4 I2 }9 n% A) [
- ---example---
7 z8 p" r7 ^2 \ - [DBEXPRESS]
1 q" ^0 O% p8 B4 f1 Z - sqldir=mysql_sql! ]- R" j. e `! X8 h' p* e
- Drivername=mysql
! ~6 s; J& j" B) h! s - Database=test
$ R9 {% S& S3 K1 ~9 _8 B - Hostname=localhost
4 u4 l0 k* u9 U5 _4 @# z+ W - User_name=testuser* l$ C2 P* m4 f9 A! {7 }" ?$ v
- Password=my_password
0 S6 k* f1 f" \. d2 ^ - GetDriverFunc=getSQLDriverMYSQL
$ ^1 @ O& u3 M+ e8 g& M# Q9 B - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& a- P% ^3 B7 Q/ P5 F7 G- G
- LibraryName=./libsqlmy.so
4 M' ^% [7 \8 Q$ [6 w/ ` - Active=1& |8 P' S4 H1 N. t0 ~3 f
- ---example---- w: h& |* I- H$ m# ]0 ^+ f. l
- ) \, Y5 v: p/ c- Q/ S2 v7 [
- On a windows box, also running the MySQL server locally, it would be:) G# m% y' H( o$ U( C2 `/ x- O' ^
- ---example---3 j ]1 D6 E8 T% W
- [DBEXPRESS]
! S# _ j% b% I _+ Q - sqldir=mysql_sql
% X, b: N( l; \ - Drivername=mysql
7 P+ a$ p. O1 w! N" e/ c - Database=test
0 o, \: o5 R8 o) x; P d# j - Hostname=127.0.0.1
3 Q# C- O. }3 Y& { G - User_name=testuser( q4 O* O/ e2 m$ t
- Password=my_password' b1 V) n0 O' I% M6 y- j8 L
- GetDriverFunc=getSQLDriverMYSQL
4 n9 R8 @* f! n s \: S" L - VendorLib=libmysql.dll/ H" l$ _5 I$ X3 q0 [: Z" y8 V/ ?
- LibraryName=dbexpmysql.dll
3 S' O- e _3 ?$ X) ^ T - Active=1
0 @6 |) @" ^! N/ |) z - ---example----
% y8 u/ k6 C( ~& Q/ h - - written 02.03.04 by pwk.linuxfan
! L# }& F$ g* T0 ]
+ |; j! @, p$ F! @
复制代码 |
|