|
|
麻烦翻译一下,下面这段文章:xhan 2 v% P5 s0 S0 S1 ?# p/ ^) q% h
' D2 p% }( N1 U' T; d' ?- % P7 ?! c& k+ P8 X0 {
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 T$ @, S: f0 l4 b - 3 }# E8 C4 K& |6 T0 P/ y0 k6 Z7 ~
- ### What we need ###
6 _$ a/ A( R& n* x7 p1 v) X% T - Naturally, we will need a MySQL server to store the data for us, this document 3 F- y! C* U2 f( v
- will not explain how this can be done - there are documents out there for the
4 Y# `( s5 n4 q) h% r - interested. The requirements include a (empty) database for TeamSpeak to use
% Y/ o/ C- e* a1 p1 ~( A6 P4 C - and a user account (username + password) that has the permissions to do stuff% z1 Q+ t: p, {9 |2 A
- with the database. Additionally, you will need a vendor library installed on the0 u4 W. l, f8 ?
- local machine, this came with my MySQL install.% s2 X4 x) ] Q) E, y
- These instructions will not tell you how you might transfer your data from the4 W2 k& r9 x# ?5 x3 |9 j
- SQLite database to the MySQL database, we start with a clean and empty MySQL
& T% i; p0 b) y: C m9 W! ? - database.0 [- I7 G+ {$ j
- Some users have reported ways to import a SQLite database into MySQL, but at+ A, M3 g% i7 w7 z' L K
- the time of writing, there are still too many issues - check the current status0 v7 j5 @/ _: }0 t+ Y0 Q
- in the TeamSpeak forums if you are interested.
* h' _4 Y" M( U3 R - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" u% f7 S# A( Y/ s3 B" Y, c - Borland was used. This driver can only interface with the client library that
! r5 G0 d* R1 i1 Z0 F& S7 b - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 n; d0 }4 \) ^! Z1 V - client library - basically all you have to do is to use a 3.x client library as
$ `! v6 C/ }2 X2 D, f - "VendorLib" and a 4.x database to connect to.8 M0 W8 O- ?% N Z0 i x: R6 Q
- If you need more info about dbExpress, you can contact Borland.
% \( m1 ]5 O: j7 y - # c4 ?! u5 A9 }7 }
- ### Doing the work ###
1 A% d5 k5 c2 U/ N; Y, o- j, O - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 E6 ?5 n" ^! n6 r+ {# W- K: H
- the perquisites right, just open your server.ini file, and add this section at
3 A8 o3 u8 a% i - the end:" Y+ z6 R/ Z7 k9 ?0 G
- ---cut here---
4 W( a% v m/ F6 j& `- x! S% o9 j - [DBEXPRESS]* ^; F" v( V' A
- sqldir=mysql_sql
& _8 J' {' f3 N6 @$ e - Drivername=mysql
) E( E$ y- e+ m% ^; z - Database=Your_Database_Name_Here9 Q. W, J9 h. r! p2 y# _3 \
- Hostname=The_PC_the_MySQL-Server_is_on" z6 k% x T! ^& _5 k6 R
- User_name=User_name_on_the_MySQL-Server C, E5 B0 {5 u P6 M2 ~
- Password=Password_to_go_with_above_user_name
2 [% @+ {) v6 e4 W - GetDriverFunc=getSQLDriverMYSQL3 f* w: l! _; }3 `: ~6 \
- VendorLib=path_pointing_at_your_mysql_vendor_lib
; V! }; ^" U! d' | - LibraryName=path_to_libsqlmy_libary; o& b' T, u: H# w7 X, c2 j( o
- Active=1
5 S }' v' M" a2 O - ---cut here---
" @6 B: |9 V( A; G) ^& y% x - In my environment (a linux box with a MySQL server running locally) I have:
, d+ t& j" M+ J1 U - ---example---
8 J7 X" I7 R2 U6 k - [DBEXPRESS]% A% e6 a6 O$ d( E. i
- sqldir=mysql_sql
: C/ Z( t1 a0 f; \# T5 `4 Q - Drivername=mysql
7 x2 y# v5 O3 J - Database=test
1 }! ]. y4 K3 c1 N/ z4 A - Hostname=localhost
6 A! [# w |8 K1 a4 w$ T& _. W1 B - User_name=testuser
, `5 O. N) _1 j; v% s - Password=my_password4 d# T, ^, c& t7 Y/ Z" n" U
- GetDriverFunc=getSQLDriverMYSQL) ?! i7 d0 w. ^) q' L) n
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* S( R K% K' ~2 k/ L- y - LibraryName=./libsqlmy.so) R9 R9 ` d: N# e! x4 @
- Active=1
8 H4 O, u, v: Y# v- [ - ---example---
" t: e+ D2 s5 r" c! l4 i5 z% W - 9 W; r% ^, Y! U1 @" P, Z
- On a windows box, also running the MySQL server locally, it would be:" I0 U! M7 P7 y7 \5 B/ l2 K
- ---example---
5 }2 B* }4 q* e8 L! X4 z4 Q4 S U: m - [DBEXPRESS]
, U$ Y6 t2 j+ _$ k" | - sqldir=mysql_sql
' A! G8 D4 @7 M$ T+ `+ j, D9 j - Drivername=mysql
2 E- k+ h" ?- O - Database=test
. } r% `0 Q: `7 G/ \. t p - Hostname=127.0.0.1
9 G a8 g+ w! c3 B4 ? - User_name=testuser5 u/ w; J0 D9 y1 {5 K2 y. ?
- Password=my_password& l' r) `/ M7 O- u4 i u5 i( l$ H* \
- GetDriverFunc=getSQLDriverMYSQL
" f% |1 }& p4 u$ D$ r - VendorLib=libmysql.dll* {1 T* @ e& x' l
- LibraryName=dbexpmysql.dll
& v' G, p% s" E; h - Active=1
& |, `) b( G3 p# a2 V# D. \! l - ---example----
6 ~/ E% W+ L3 ?& u- x8 U - - written 02.03.04 by pwk.linuxfan
% J; J) \7 B9 @0 H& t
' z# {& p5 g! W! b% I, \8 a0 ~
复制代码 |
|