|
|
麻烦翻译一下,下面这段文章:xhan : U( Z$ B4 X4 `5 k. U I, e3 @+ x
* n" L& F4 H7 O$ a6 O-
. ~% |$ q" I9 r ]* E7 B0 {. ^; u - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 v: e" d9 ^. T( m - / Z4 a5 } U6 T: L4 V, l) D3 F
- ### What we need ###
* h K$ y& A4 q5 c. o - Naturally, we will need a MySQL server to store the data for us, this document
7 O4 P9 ]' A" B- @ - will not explain how this can be done - there are documents out there for the ; |# D0 |6 o8 u. H/ l6 X
- interested. The requirements include a (empty) database for TeamSpeak to use3 z* e" n( L( F4 y4 n
- and a user account (username + password) that has the permissions to do stuff% h- [5 U2 T# L7 k% o( h9 J/ s
- with the database. Additionally, you will need a vendor library installed on the
0 F4 M# z( z, Q2 T - local machine, this came with my MySQL install.2 P D6 `! z! k3 W' Y: N2 @
- These instructions will not tell you how you might transfer your data from the
' S. Q$ U! E# P o3 w) }8 c - SQLite database to the MySQL database, we start with a clean and empty MySQL+ Q! }8 d0 ^( ?2 H3 S# T) v' c
- database.
3 M; ^( I% W7 s1 f - Some users have reported ways to import a SQLite database into MySQL, but at
+ N; l: ^; D) ~# P: U - the time of writing, there are still too many issues - check the current status
0 F5 n" a# |6 Z, s( k& a# O- Q - in the TeamSpeak forums if you are interested." n7 [/ H M! Z9 }+ `6 q
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, `4 S8 R9 I! H- g' J - Borland was used. This driver can only interface with the client library that
S1 r5 E* \5 v2 [ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 _" f: U% u2 r6 a: u/ D
- client library - basically all you have to do is to use a 3.x client library as ' v9 `2 e) n* c* E# O6 b
- "VendorLib" and a 4.x database to connect to.. m2 N) i6 Z/ m
- If you need more info about dbExpress, you can contact Borland.
& q6 i- ^/ J) ^2 g, G - 1 E( _8 f" |/ z7 h+ g4 Z! t
- ### Doing the work ###8 f) r# T, H \6 @3 Q7 t i- P
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 n# ^4 f& b5 o& Y0 @! |
- the perquisites right, just open your server.ini file, and add this section at
; k- [( e, z4 q( n# I - the end:
4 @: J8 g# u* Y8 D* c - ---cut here---
) X: S9 ^# [' W/ b( _- \1 ^ - [DBEXPRESS]
& [8 G7 O9 w2 ~* Q# v) F - sqldir=mysql_sql; `7 |6 t: E6 Q2 h8 Q' p# ^
- Drivername=mysql
/ K% X( i, f; d/ k. W: m( k# q* f - Database=Your_Database_Name_Here
: o# u, d' W$ F9 _) N - Hostname=The_PC_the_MySQL-Server_is_on
# W6 a6 H& p5 x0 u+ c - User_name=User_name_on_the_MySQL-Server. I+ P, V, \& |
- Password=Password_to_go_with_above_user_name
+ t/ L c) n! ?0 m% ? - GetDriverFunc=getSQLDriverMYSQL
7 A3 ]# r. ?; X1 |) d$ I% z - VendorLib=path_pointing_at_your_mysql_vendor_lib( u& n4 J, F: g) `. L
- LibraryName=path_to_libsqlmy_libary1 O5 C o# \% {( F
- Active=1
/ ~$ M" A8 T3 V, s5 R. ]% Y - ---cut here---
+ j6 }7 c* { D; Z3 U - In my environment (a linux box with a MySQL server running locally) I have:( P2 N& q2 s4 ? k( E& I/ k0 J/ R
- ---example---
% \8 `7 x- B% n! U) G& C5 N - [DBEXPRESS]9 x/ k, E+ a$ e) t
- sqldir=mysql_sql
" h& Z0 G7 ^* `, O& H' ]$ c' p - Drivername=mysql
4 l) H# @3 I& B5 T - Database=test
7 \& [% j( F! V# G+ n/ a - Hostname=localhost
4 l1 A% A% ]( J - User_name=testuser
+ o) P, K# t* o! b5 a1 A; J5 L - Password=my_password
* S) k, {5 c; g7 `6 i- z - GetDriverFunc=getSQLDriverMYSQL# k- K( R, m9 m! n% Q7 O
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.05 [2 ^/ |; n0 m n' b
- LibraryName=./libsqlmy.so
/ p' w/ p+ }- ^0 `( S - Active=12 F( H# G" o6 m0 R
- ---example--- m1 B/ T) u4 B0 j) v
- J k6 E5 z+ ~1 R* _5 u! S! W( H- On a windows box, also running the MySQL server locally, it would be:
- c6 [: M- Y* q4 V( r, k - ---example---
6 N3 }8 F0 @: D) N$ y8 J - [DBEXPRESS] @* {% r' q8 b
- sqldir=mysql_sql
. \- g2 f9 v8 y0 w- b - Drivername=mysql3 X# |7 B2 \. F% D$ c3 j
- Database=test. Y4 x7 f: X- j$ q3 `! k+ }
- Hostname=127.0.0.10 c- X9 u" H, l" i
- User_name=testuser+ T" K! r2 _6 M$ r; F
- Password=my_password- q8 n9 o0 e4 b. ^
- GetDriverFunc=getSQLDriverMYSQL% [8 G+ Q3 j6 i3 E
- VendorLib=libmysql.dll
$ T `! M/ f! v8 G* u9 K! A% \( s - LibraryName=dbexpmysql.dll
* j& P v+ ?" n: i; y - Active=1
/ [. \4 b# N) b, h6 } - ---example----
# j# F$ }) q9 s1 Z - - written 02.03.04 by pwk.linuxfan
7 |3 b; l! A1 V1 g5 h - , e) K" h6 C4 [! K7 A: r
复制代码 |
|