|
|
麻烦翻译一下,下面这段文章:xhan & }4 C% @. [" L+ v2 Y& i
]4 p! {$ U' s* }- h/ u6 Y
-
* S- I# ~( w/ _: { - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
6 {* _7 \) s' a; v. g E- M - * G& e1 b6 _( g" c8 ~) S
- ### What we need ###
1 a: o! }5 }; g5 p* f- n - Naturally, we will need a MySQL server to store the data for us, this document
( H; Y6 z) W6 j1 n- V# R - will not explain how this can be done - there are documents out there for the 2 ^7 N: j6 z( {4 u
- interested. The requirements include a (empty) database for TeamSpeak to use9 z1 n3 D) A% O, A; ^, u1 N! P% D# W
- and a user account (username + password) that has the permissions to do stuff# X$ Z3 m }1 O$ l
- with the database. Additionally, you will need a vendor library installed on the( c% A% L7 c0 ?, N
- local machine, this came with my MySQL install./ G2 N1 G" J( p
- These instructions will not tell you how you might transfer your data from the6 f5 ?/ S" Y. a2 J8 L" q7 v& p
- SQLite database to the MySQL database, we start with a clean and empty MySQL
) U2 Z8 o+ \% _) N! g1 {8 O; N - database.
7 b$ d' Y0 q* W0 d. i& P8 @8 d5 k8 [ - Some users have reported ways to import a SQLite database into MySQL, but at
3 n6 U! D1 N% P+ @' H& o; ~6 O - the time of writing, there are still too many issues - check the current status
s& Q2 q" R7 f - in the TeamSpeak forums if you are interested.! f7 O9 v# t$ j8 J8 s
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 x$ e* g! {3 \: w7 I7 s/ O - Borland was used. This driver can only interface with the client library that
8 R' _- v F5 _- q' t2 L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
- b: }' t6 U0 U( n2 e - client library - basically all you have to do is to use a 3.x client library as ) k q( X' r$ m/ B5 ]0 e
- "VendorLib" and a 4.x database to connect to.
* I8 f! Y* o! n* J4 J5 A - If you need more info about dbExpress, you can contact Borland.* t _, Z$ @* x0 ?- N) k; V
- p/ U# X( ]% Y" T5 I- ### Doing the work ###
5 U0 f* N$ k1 M6 l* b' c - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
/ s4 R- p% p9 u. W0 Z; }% s4 l1 U, v - the perquisites right, just open your server.ini file, and add this section at
& ?' H! o! a, |; U - the end:2 r; o/ h/ K0 _. Z) ?, v
- ---cut here---
& n% B0 N; F0 b - [DBEXPRESS]; ^ q' e+ m( a# p5 v/ N; d3 {
- sqldir=mysql_sql
. ?4 B5 j) [; e - Drivername=mysql
) q3 B" Q! P4 n - Database=Your_Database_Name_Here% E! |; T2 u' a" _3 ^0 x' E0 d, c
- Hostname=The_PC_the_MySQL-Server_is_on
5 _* i8 B: c/ v ^& {! X& a - User_name=User_name_on_the_MySQL-Server3 C( U, K( v7 x" W* ^7 o
- Password=Password_to_go_with_above_user_name
7 p3 G. w" p, L: V; f - GetDriverFunc=getSQLDriverMYSQL
0 k% y" A' q6 c - VendorLib=path_pointing_at_your_mysql_vendor_lib/ g# a% [) `% q$ J" _0 A/ j7 Q& \
- LibraryName=path_to_libsqlmy_libary% _- f$ P7 B$ L6 z
- Active=1
' q* ~) d: {. |5 j& }% w# j - ---cut here---) v. q# S8 L: z( d; s: c
- In my environment (a linux box with a MySQL server running locally) I have:
7 V. F9 R# J! f+ ~ - ---example---
9 J4 r1 R9 k9 H& g: a4 P - [DBEXPRESS]8 B% }' ]6 I3 ^( @
- sqldir=mysql_sql0 k+ K' H' v t8 _* d( L
- Drivername=mysql
j; c" J' ^4 G8 ]. v! [ - Database=test
; @+ L3 ^) z8 N( C, b) T% m - Hostname=localhost
! `" [1 s+ F) o; f3 ]/ F - User_name=testuser; |$ i# X- g& m0 N( m
- Password=my_password0 i4 c$ G7 n" o5 d+ I
- GetDriverFunc=getSQLDriverMYSQL- |& T, r& J9 [* B. s5 F
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ d% G1 M0 ?' q' _1 ^ - LibraryName=./libsqlmy.so
6 H% Y. J" V& |; Y! F& A2 ? - Active=1( T0 K: X% V7 P- \' d
- ---example---
- H3 P( u! t# _- [: S) V5 T4 W: s$ g - ( Q6 D3 Y% J+ }' P$ K8 Q2 \
- On a windows box, also running the MySQL server locally, it would be:
, o0 ]) Y5 i! V$ C3 ` n# l! k - ---example---; G9 [' q/ X* f" w, Y3 I. a
- [DBEXPRESS]
- i$ P- v" d. _0 p1 A - sqldir=mysql_sql
0 ^4 [0 b! h u# d# l - Drivername=mysql4 S i- {/ [* D3 R/ ]0 f- t
- Database=test
$ C. }. v. J0 ?/ i, ^ - Hostname=127.0.0.1
, i( T% N& ]3 d7 z3 f) U - User_name=testuser
W+ ?; R' d: N7 w& n - Password=my_password
, E8 c& J7 |0 ]8 r" R - GetDriverFunc=getSQLDriverMYSQL
0 q3 B4 a) @# h3 E2 p - VendorLib=libmysql.dll. ~1 h# `7 |- l0 a: {; a$ v
- LibraryName=dbexpmysql.dll% b6 U) O3 O) W3 i( X: y- X( }
- Active=16 V; }% ~0 f& I- u
- ---example----% ^" v n8 s& t/ g: B4 ^- m: {
- - written 02.03.04 by pwk.linuxfan; g! K/ G( I7 W7 } Y8 L# x# x1 @$ {
- 7 M& s1 ~: G# S) a# G
复制代码 |
|