|
|
麻烦翻译一下,下面这段文章:xhan
; c9 J7 N, J J2 x# g
) W2 f' u, `* N- * `5 s* |) C! c5 {& X
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( g! u9 @4 Z6 H9 I2 d - % G {) A* R5 l& W' G
- ### What we need ###& y) S' ~8 ~7 i. p
- Naturally, we will need a MySQL server to store the data for us, this document ! _ m) Z& Y5 d. u
- will not explain how this can be done - there are documents out there for the $ O+ g/ n! i4 b0 H0 W
- interested. The requirements include a (empty) database for TeamSpeak to use
, S+ R& V7 X& E0 p( Y1 @' C - and a user account (username + password) that has the permissions to do stuff: ^# W! a" n, p8 J. Q/ T2 L) v
- with the database. Additionally, you will need a vendor library installed on the
$ D+ k4 ]* }2 \9 w* u$ u9 g- a - local machine, this came with my MySQL install.: B. A( w; P s* d0 s+ _' O3 I8 l1 |
- These instructions will not tell you how you might transfer your data from the$ C$ w. ?) w, O2 p! ?' A5 d8 ]
- SQLite database to the MySQL database, we start with a clean and empty MySQL+ m4 O# `5 q& g& c
- database.
6 h5 j$ y4 m, ~4 N8 I. [ - Some users have reported ways to import a SQLite database into MySQL, but at4 M$ F: e3 \# b) ~2 ?% c0 t
- the time of writing, there are still too many issues - check the current status u& p: p- D* F, a$ f+ j
- in the TeamSpeak forums if you are interested.
" Q9 L/ Z; u ^6 A. X. `9 t) i - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. J3 \$ ?9 [, E# [4 O& x - Borland was used. This driver can only interface with the client library that
/ G J, C1 ?! [6 e o( ~7 e# g - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) o5 T8 x* E2 \ C1 v
- client library - basically all you have to do is to use a 3.x client library as 3 x. V6 J! ^& l2 }# T$ \# a
- "VendorLib" and a 4.x database to connect to.
$ T5 ?" e* n, N2 E - If you need more info about dbExpress, you can contact Borland.4 J9 o! ~: Z. ?
- v% O6 k0 A/ P6 S* ^ k! T
- ### Doing the work ###
; i. @6 Y% r( u( A. y% C - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
% ?0 o' R$ F- d7 S d t% ?$ [* Z - the perquisites right, just open your server.ini file, and add this section at- d9 d+ h. k9 k, r4 G1 q7 ?
- the end:
/ ^9 V7 g4 ? |, } - ---cut here---
: F9 t& ] p' g1 h - [DBEXPRESS]2 T; z. C n; k. H9 Y8 g
- sqldir=mysql_sql9 A1 N& t0 ^8 \/ m+ Z `
- Drivername=mysql
4 X1 r, H' L4 Z/ Y7 D - Database=Your_Database_Name_Here1 _7 A+ K9 k& ^
- Hostname=The_PC_the_MySQL-Server_is_on
* J; w8 l- H8 y9 R% l - User_name=User_name_on_the_MySQL-Server7 `! C6 l+ M7 e; f' [5 H3 p. j
- Password=Password_to_go_with_above_user_name
5 J& u( J) x* M S% V - GetDriverFunc=getSQLDriverMYSQL
: o% R/ W1 o; {& {9 k5 L. e. V - VendorLib=path_pointing_at_your_mysql_vendor_lib) `2 B3 I3 R s( @
- LibraryName=path_to_libsqlmy_libary ~# R( M) q' ~4 _6 ^
- Active=1
) H7 Z" E m3 G3 T - ---cut here---
# L9 G$ @" X* x - In my environment (a linux box with a MySQL server running locally) I have:
8 B7 Y2 Y9 B% H. x2 | - ---example---
& L8 @8 V* x* A( g - [DBEXPRESS]
* s" ?' u0 _0 _+ L% g9 d - sqldir=mysql_sql$ X. |. m" _6 @, Z3 o* t- @+ ^
- Drivername=mysql
, l; R x7 h E( s6 B - Database=test
( l$ \% p+ D, y! f0 n7 u - Hostname=localhost- y+ f: p! e% P; C6 O' i
- User_name=testuser" w: R! t+ e( F* c% n
- Password=my_password
3 c0 G7 O1 ]0 M - GetDriverFunc=getSQLDriverMYSQL
1 l/ H% F/ J2 f/ r1 D+ C f - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, f* V0 g! h; z. ?5 i9 B" Q( G - LibraryName=./libsqlmy.so
6 k0 e+ t u. O$ g0 y - Active=1
$ F7 H9 R+ z" P - ---example---0 G( `/ S2 u# s( h$ U2 U
- 1 y2 H- v! S9 S5 @2 y
- On a windows box, also running the MySQL server locally, it would be:
* R; g0 i& }0 \5 ^2 T - ---example---
; }, ^9 S5 D; i% w& O - [DBEXPRESS] X* m7 W+ g4 ^. ~1 M) v
- sqldir=mysql_sql
6 `- w4 u+ G# l% A# z# t - Drivername=mysql3 T5 y0 B6 F* I; V2 C
- Database=test" Q% j; y' N" L( A, m# Q7 Z* \
- Hostname=127.0.0.13 p3 K: c% `5 z
- User_name=testuser; s% B' }) h6 V- E* Y/ n+ ]
- Password=my_password8 s$ o; y( a/ N( v% m
- GetDriverFunc=getSQLDriverMYSQL
9 y; C2 ~3 P6 g3 A8 X& l( s - VendorLib=libmysql.dll' {/ D6 U. B# u6 s1 G
- LibraryName=dbexpmysql.dll
3 u3 P8 T; ^* b3 _1 R - Active=1
# q! [8 {. v) I& a0 s+ W2 q - ---example----
' P+ Q" g* v+ ^+ Q9 {8 T, [. h - - written 02.03.04 by pwk.linuxfan* Q% B; I3 M$ g, @6 v6 E
- E; X7 o) t2 W6 }0 |
复制代码 |
|