|
|
麻烦翻译一下,下面这段文章:xhan 4 j" g8 \' t; M. }
3 n3 P+ b& C! G+ \/ i' C$ i
-
! m M" _& m& ~5 U3 W% `0 ]" q - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 M/ G! T& g- b9 x8 {3 }: w0 E% s
- " Q2 i& a9 E8 g* L" [$ ^( j8 I4 y
- ### What we need ###
) ~! |/ O/ A6 l5 |. N7 ?3 J/ R' K7 W - Naturally, we will need a MySQL server to store the data for us, this document
5 I8 k' R6 G3 t. _: ^6 A) z - will not explain how this can be done - there are documents out there for the
! g+ C& T( V" k B! Y - interested. The requirements include a (empty) database for TeamSpeak to use6 G3 s$ x) G2 i9 Z+ j6 m- S
- and a user account (username + password) that has the permissions to do stuff
+ }7 y: q$ v: b! m0 F - with the database. Additionally, you will need a vendor library installed on the U, [0 @- g% |* D& n1 b( |
- local machine, this came with my MySQL install." S- w: {. o0 L4 J- L" H
- These instructions will not tell you how you might transfer your data from the
7 Z1 I4 f) j5 N) x5 u7 B% M7 D6 T& A - SQLite database to the MySQL database, we start with a clean and empty MySQL t! h f8 {* k9 \
- database.
. d' L( S" g P+ P: m, q1 ] - Some users have reported ways to import a SQLite database into MySQL, but at
3 Q- j9 ?# J7 H - the time of writing, there are still too many issues - check the current status) O/ N% ? u4 Z5 m5 t3 d4 O
- in the TeamSpeak forums if you are interested.
$ G/ l% u' u0 v5 g1 C6 ~* D - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 d& j) ^* k9 f; Y& Y6 K4 O+ ] - Borland was used. This driver can only interface with the client library that
1 K5 _+ c' S0 Z8 t/ d8 y6 f* N - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
* [; M& D2 W8 ?8 `7 z - client library - basically all you have to do is to use a 3.x client library as 1 V% b& D' N3 S- D4 ?5 E0 I8 c
- "VendorLib" and a 4.x database to connect to.
|" v" x* f9 T, a; ^! j9 P - If you need more info about dbExpress, you can contact Borland.
7 @ i9 A8 h/ U3 \. D: ~* N - 9 A2 q8 e( y4 r! Z+ @3 B" F% T: J1 @
- ### Doing the work ###+ c- i k( b% H _/ f
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 ]( c- V5 y* L - the perquisites right, just open your server.ini file, and add this section at2 X; X8 J" V T% Q9 q
- the end:8 O9 H: I5 f# t1 ~- `3 g8 B
- ---cut here---
: u& s; c/ u5 p' x& O# A: p - [DBEXPRESS]
$ z3 P J& t: | - sqldir=mysql_sql7 {( f, F0 B2 E; P0 r
- Drivername=mysql% Y% G1 E6 O+ e( I: w
- Database=Your_Database_Name_Here
7 D% H' q) L! n% W - Hostname=The_PC_the_MySQL-Server_is_on6 x. m' v& x# `) M5 X
- User_name=User_name_on_the_MySQL-Server
, E8 A/ I" y1 o+ }4 [% }( L* k7 K' L - Password=Password_to_go_with_above_user_name
9 ?! \* p% b# D) H/ P& \2 ~8 ?2 ~! y - GetDriverFunc=getSQLDriverMYSQL
- S) g: o y0 @ - VendorLib=path_pointing_at_your_mysql_vendor_lib J" F( q. s5 r8 t0 ~2 H: p. [
- LibraryName=path_to_libsqlmy_libary
6 N p3 s$ }. G b - Active=1
; m b% o, r: J8 ` - ---cut here---
2 `# v- V. U$ F9 M/ P - In my environment (a linux box with a MySQL server running locally) I have:
& a0 a- Y" X) M% h$ ] - ---example---
* k4 t; t# E: k$ {& C% y - [DBEXPRESS]% Y* u4 ^7 V4 a, c
- sqldir=mysql_sql: G; H3 R6 q* D+ E/ k
- Drivername=mysql! t4 ~9 J! Y9 k: ]; ~$ T
- Database=test
u, G1 I; G5 G$ e+ V, @: s - Hostname=localhost l0 L& l& W/ l' @1 e- h
- User_name=testuser9 B; y/ B8 v5 h% u* q6 C
- Password=my_password
# t6 r5 Z% P$ r6 H - GetDriverFunc=getSQLDriverMYSQL
# z: C. n) m1 w# a1 }) s1 a" h/ o - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.06 c! g7 ^: q5 N Q
- LibraryName=./libsqlmy.so; ]' j& K4 n' X; B1 Y) ^8 U
- Active=13 O0 Q8 J) Y' ^& T' f q, o" B
- ---example---/ T/ Y, V& p8 @9 U5 e5 N
- 8 I+ z( e( B' ~& t/ ~1 b, a- m
- On a windows box, also running the MySQL server locally, it would be:
. ?. q! m% U. j - ---example---
7 e- |7 c. C" @# x - [DBEXPRESS]) P* G) S* j' n2 E* G
- sqldir=mysql_sql
5 v9 c0 G3 o' R; r1 P - Drivername=mysql
`2 f& g; U- {* p: p - Database=test
! J( o9 e$ w T( H- B - Hostname=127.0.0.13 H9 A( {! t' D$ {
- User_name=testuser% F' Y C. _7 u/ }
- Password=my_password* V! R' u8 z H; C4 Z
- GetDriverFunc=getSQLDriverMYSQL: k- ?( O# D' ~$ ]1 }! Z& `6 z
- VendorLib=libmysql.dll
4 S2 Q, A: |( h+ I2 B# d; J- u0 _ - LibraryName=dbexpmysql.dll5 P9 M& ^2 \) m. G* h
- Active=1
8 \: G3 S5 ?4 {& V - ---example----2 x8 q. o/ M% x# T: W& o
- - written 02.03.04 by pwk.linuxfan& t* i: J6 l+ F5 t
0 b4 m* h% L; `7 v( M. M* K g
复制代码 |
|