|
|
麻烦翻译一下,下面这段文章:xhan ' {( g1 P, Z1 P5 S# [
) `' S, ~% W4 {0 q4 S( h1 }& z- 3 N* u, _8 ~4 z5 L# v+ a4 k- F
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& E1 u; J* K0 v0 v! E$ j
- ; _% T" n" g% K* G
- ### What we need ###5 V: Q& k; ?! q9 a
- Naturally, we will need a MySQL server to store the data for us, this document 6 N( I. v$ m$ Q! c0 G: I: x0 s3 X3 ^& P
- will not explain how this can be done - there are documents out there for the
% c2 I+ p* L8 |9 s - interested. The requirements include a (empty) database for TeamSpeak to use
, q Y4 _6 g% s" R7 K( n/ ~6 }2 | - and a user account (username + password) that has the permissions to do stuff
' M5 y* K5 s& l - with the database. Additionally, you will need a vendor library installed on the
/ U$ H3 S$ U: w3 ~ - local machine, this came with my MySQL install.
1 V+ ?8 i N# k0 c5 ^6 i& { - These instructions will not tell you how you might transfer your data from the. M# A m& i4 ^4 Q; [: X/ ?
- SQLite database to the MySQL database, we start with a clean and empty MySQL
2 R+ h6 B$ C G8 X# Z* j3 q - database.
% @ W% X3 V4 ? - Some users have reported ways to import a SQLite database into MySQL, but at# i' C1 I& n8 h, A9 p' C
- the time of writing, there are still too many issues - check the current status
5 T" M/ O8 @3 V, M7 r - in the TeamSpeak forums if you are interested.
4 U$ r8 A- C9 S - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from8 N4 s% S3 A8 c7 \% I' B
- Borland was used. This driver can only interface with the client library that 4 A5 h5 y( @; [/ V
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this( F* y6 e1 Y, @3 @# B1 P
- client library - basically all you have to do is to use a 3.x client library as
' _4 A. e* `: K. n5 r - "VendorLib" and a 4.x database to connect to.4 M6 n5 m( x$ T$ x# e
- If you need more info about dbExpress, you can contact Borland.
/ t* W/ C- t# ]# K- O
" e0 s& t' g/ T1 P* u( ~7 T E- ### Doing the work ### X( _# F# P- q( M* w- B
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; V8 ?. h2 N$ l- f. X$ G& Y
- the perquisites right, just open your server.ini file, and add this section at
+ n- S+ u0 [ k% S - the end:+ ^9 s) T s2 m7 f3 X/ w9 R
- ---cut here---1 e" n; c/ ]" U9 I
- [DBEXPRESS]+ |. X/ p6 N! u' R5 x; \9 z# W, m
- sqldir=mysql_sql$ s* D- Z) f6 D, M1 T: S
- Drivername=mysql
/ C6 K! X9 B1 o" ^0 T/ Z" Z - Database=Your_Database_Name_Here* [3 |! m) [( g
- Hostname=The_PC_the_MySQL-Server_is_on
. j3 `# a7 n" \# I' [ - User_name=User_name_on_the_MySQL-Server
( q! v$ P0 j. _2 O6 P- |. w& U - Password=Password_to_go_with_above_user_name' R Q5 f& K. C; @
- GetDriverFunc=getSQLDriverMYSQL
& f! O1 B( E( C& T - VendorLib=path_pointing_at_your_mysql_vendor_lib
# L# P6 W/ H. q; T6 c* x; w$ h - LibraryName=path_to_libsqlmy_libary8 I1 k% q& T" |3 C3 L& e4 `
- Active=1- I# D+ s2 l1 ^ Y9 x
- ---cut here---9 ~- k* G* Q5 ~1 V1 [* E2 K8 v
- In my environment (a linux box with a MySQL server running locally) I have:7 p$ E' p4 |1 t* Q: M. }
- ---example---/ ]" y$ Y# ~8 a- |
- [DBEXPRESS]5 s/ K' A7 Z. _3 t" v7 ?
- sqldir=mysql_sql5 F, a* A; ` n! n/ \
- Drivername=mysql* u" ~/ S$ E* V- G ^& E
- Database=test
* `! D9 b4 \$ d4 D6 q4 h" k3 ? - Hostname=localhost
5 p4 w3 w0 z w2 l( t* j - User_name=testuser* s( {) ^$ l \: F
- Password=my_password
2 r4 D" l; q h I m. B# X! O - GetDriverFunc=getSQLDriverMYSQL/ N: |) m$ O6 B$ F) h' _1 L* v# O
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- F9 `# A9 R% y - LibraryName=./libsqlmy.so
# ~: M* a( x/ F0 X3 G - Active=1; S( a! b. j/ U$ @+ r }5 `
- ---example---4 V6 \' j7 _2 r0 O/ h
1 l; Y% _6 j/ c& Q9 ^7 b3 N; F- On a windows box, also running the MySQL server locally, it would be:& c A% F9 K: J, t W
- ---example---6 r1 U+ K8 H! F) W6 j1 w" d: P
- [DBEXPRESS]: b6 \) `. t; y! E5 d# ]; J7 x
- sqldir=mysql_sql
8 _+ b" E: W( I% {& ~ - Drivername=mysql
% @ W' z; W8 h8 `6 d. r9 S1 g - Database=test
$ j9 S* r: J4 A9 ?" m - Hostname=127.0.0.1! W( s7 |/ W) x i3 [
- User_name=testuser
( r% d# u; Q0 c5 N+ E - Password=my_password
. e$ W# r4 j. i% e - GetDriverFunc=getSQLDriverMYSQL
: p4 g$ [5 r& r" f( q3 x - VendorLib=libmysql.dll
* y, {8 C7 P, M2 F" A - LibraryName=dbexpmysql.dll1 z5 u% E+ s2 a; W3 W
- Active=1: C% o5 K4 v, S$ \9 Z6 L1 F
- ---example----
" _" W) T+ g4 K0 h% X3 @ - - written 02.03.04 by pwk.linuxfan$ O7 p) i$ R% C( y8 B6 A# B! _
/ {3 ?4 v! \6 N: S1 y- R
复制代码 |
|