|
|
麻烦翻译一下,下面这段文章:xhan - w; P; S+ q+ A3 k# L; P- C- l, `
% T- H2 Y) Y$ n6 `$ ?7 z- $ ?+ Z' a7 ?3 S+ w. \
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. W* L( Q7 l5 k7 ^. Q/ k2 R
. h1 _6 J6 @/ X* ^2 S- ### What we need ###
7 p$ K1 W& i2 P, U4 X - Naturally, we will need a MySQL server to store the data for us, this document % N' V9 E. Y# h1 L
- will not explain how this can be done - there are documents out there for the ! z2 K" _/ ^; ~7 |
- interested. The requirements include a (empty) database for TeamSpeak to use
7 Q# o6 ~7 a j/ f' o* ~ `2 t/ U' p - and a user account (username + password) that has the permissions to do stuff. ]; z% l0 Q2 P: W: `' M
- with the database. Additionally, you will need a vendor library installed on the( ?3 F6 R& d/ ~. }
- local machine, this came with my MySQL install.) z/ Z( T# S% X4 D2 o3 R' d% H1 @
- These instructions will not tell you how you might transfer your data from the
7 G; |; n" }& v; X* o. `" }- M - SQLite database to the MySQL database, we start with a clean and empty MySQL
: K0 v. i+ a' [# T% u - database./ I$ t& H6 T. s
- Some users have reported ways to import a SQLite database into MySQL, but at! `0 J, [8 f2 B% P, f$ t% k$ @& Z
- the time of writing, there are still too many issues - check the current status
9 r) F# ~. R0 T8 ^3 Z+ d0 \ - in the TeamSpeak forums if you are interested.) u& J/ D6 K2 _& r, w* R9 a
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 m2 i1 Y5 y8 x$ q8 ]
- Borland was used. This driver can only interface with the client library that / R# ~8 r( ?: h" q) O& K8 K5 S, _% p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ k$ p- A3 _6 X2 E/ T) e
- client library - basically all you have to do is to use a 3.x client library as
S9 {# T, R: q" j! ~ - "VendorLib" and a 4.x database to connect to.
* L. D9 r" x# ?+ y& A - If you need more info about dbExpress, you can contact Borland.& X+ J& G/ b: E! e1 {
- : N& ~' Q; a! P- G- b1 |+ r
- ### Doing the work ###
' M3 H( f1 D2 r+ h8 v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, ~2 E* L2 i" E4 h6 l. H6 Z - the perquisites right, just open your server.ini file, and add this section at5 M* \7 K/ Z5 ?2 L- X& k
- the end:
. V/ C# q& b+ o5 \7 [) M9 w - ---cut here---
* |; D% `2 p6 [* F6 C& G0 x - [DBEXPRESS]
1 T# ?# |, n; _" O6 B; c - sqldir=mysql_sql6 Z" ^8 T* r* I- M. [" U2 U
- Drivername=mysql) N/ k1 r- x8 ?* ]! b- @4 v
- Database=Your_Database_Name_Here
. u/ G9 ` n4 j6 f2 j5 q$ M& H4 p - Hostname=The_PC_the_MySQL-Server_is_on. V* y! J6 c$ N' x+ Y" o2 p
- User_name=User_name_on_the_MySQL-Server
. y/ Q/ H& r$ l - Password=Password_to_go_with_above_user_name6 ]; Z+ B' E: l
- GetDriverFunc=getSQLDriverMYSQL
# e1 n3 ^; \$ g( y M% R) O - VendorLib=path_pointing_at_your_mysql_vendor_lib L0 O$ e/ s& `0 h, V) z
- LibraryName=path_to_libsqlmy_libary' e' R: l1 B! M# h/ I( J* B
- Active=1( |8 L6 j' T# A4 J( x' Y; O7 d
- ---cut here---
& o* ]3 I) f; k y" G1 \+ d# } - In my environment (a linux box with a MySQL server running locally) I have:
0 U j, S, S' e8 Y* B; o+ c! U - ---example---3 V( t9 M, s! }6 d( y2 A$ _0 y. h
- [DBEXPRESS]& Y$ k1 B8 u, e5 A; `3 L/ q5 U+ q
- sqldir=mysql_sql
7 ]' O/ g; r% Y' }! W6 k - Drivername=mysql
" X* i) A- p" Y9 X: H - Database=test0 ~; Q, P: A7 o( g2 F
- Hostname=localhost
/ v1 T' d B g% ~9 M - User_name=testuser2 {! m# s* B( j; x. u; }* E( ]
- Password=my_password
. {: S: ^6 e5 \4 u9 r8 O9 o - GetDriverFunc=getSQLDriverMYSQL
5 y7 J0 Y0 W2 ^# O) ], ^! | - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* J3 k( _7 V6 D/ z# q4 b& L
- LibraryName=./libsqlmy.so6 C. t. V/ p; X3 i0 G/ N
- Active=1- X, u1 n" P3 h. S% {; p1 w
- ---example---
4 r, a- S' w1 {
; Y( K5 E/ D- b# N9 e9 w- On a windows box, also running the MySQL server locally, it would be:+ Y6 x% K$ y. E n- Q) q9 s1 c
- ---example---, E, A6 d% S# O
- [DBEXPRESS]
" ~" N; n; Z* m" G( R - sqldir=mysql_sql: n) k" k9 s6 h r
- Drivername=mysql: _* J1 h, o" b2 z0 P
- Database=test
7 {% V! m+ C S - Hostname=127.0.0.1
+ F/ Z0 d% [3 O, |9 {0 `0 a - User_name=testuser6 w* G8 `' G. R8 d* O8 T
- Password=my_password
s R+ ?$ k- f# g( j+ V+ Q - GetDriverFunc=getSQLDriverMYSQL% z6 x& u' ?: h! q$ D0 E0 T0 V$ c
- VendorLib=libmysql.dll
1 z5 i$ D5 B2 C" N' W - LibraryName=dbexpmysql.dll
0 B: `% \% V3 T y" O W1 W& V( B! W4 Q - Active=1" s' r9 P8 I9 q/ \* O
- ---example----
- A2 k4 N+ Z3 j2 `* ` - - written 02.03.04 by pwk.linuxfan
* n' _% D+ q& ?7 H+ \1 _, H
1 H- h4 I" O' _4 U2 d& R* \: Y' Q
复制代码 |
|