|
|
麻烦翻译一下,下面这段文章:xhan
% V+ I* I0 T" J# Y
* `2 e" t4 ?: x4 \- . m' i4 L N- L! D; Q
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; ?- C1 S9 y) x% s' n- l* r
% S' K t6 q" c* j* Q- ### What we need ###& ]+ j! M7 O' g; L- y
- Naturally, we will need a MySQL server to store the data for us, this document
4 n' j6 g' a l$ g! G' C; b% V - will not explain how this can be done - there are documents out there for the
4 m* D, P# y$ d# @ - interested. The requirements include a (empty) database for TeamSpeak to use
. n+ b( W! }! l - and a user account (username + password) that has the permissions to do stuff
- {; K `* V5 A) I( `8 I - with the database. Additionally, you will need a vendor library installed on the. k" ^& @7 L. e/ D$ C! O
- local machine, this came with my MySQL install.+ y* ^7 {5 [+ M
- These instructions will not tell you how you might transfer your data from the
1 ]- ~* v: m6 w, g' P - SQLite database to the MySQL database, we start with a clean and empty MySQL b8 c n1 k& \( q( r3 ~5 {
- database.
0 l z. M# s% q! k. H+ N9 k- B - Some users have reported ways to import a SQLite database into MySQL, but at$ y# w8 O$ L: ^3 |; C" A+ I) B: H
- the time of writing, there are still too many issues - check the current status
# h2 }8 u: U* N- ~ - in the TeamSpeak forums if you are interested.
3 n& {1 e8 U: o! E! v - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 D0 ] Q x5 k0 _ - Borland was used. This driver can only interface with the client library that
9 v0 b: }; a( o0 g+ s! R5 b2 h, t - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this* ?9 n ?% Y+ L* |. Q' K( }
- client library - basically all you have to do is to use a 3.x client library as
0 v: ~6 U9 h0 U - "VendorLib" and a 4.x database to connect to.# }& t% ?3 g: o5 O8 c% V+ q0 n
- If you need more info about dbExpress, you can contact Borland.
4 O' t1 M. ]( u* K& S# u7 {8 I - ) c8 ?7 ^2 l! L! {. i/ ?
- ### Doing the work ###% u" Q' C+ I) z% B% D
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: w$ h, V+ e; \8 v4 v& L
- the perquisites right, just open your server.ini file, and add this section at
* T: A3 g0 q( h! ]9 O; y - the end: ]0 m% t+ p* n9 z* ]
- ---cut here---
+ l. l0 K; f" L( q, o7 _) L- | - [DBEXPRESS]
1 {2 d/ u$ B. _- i - sqldir=mysql_sql/ _+ z2 u- u3 x# r* R4 h, G6 P
- Drivername=mysql
# H! a+ S d" I% M* L5 n - Database=Your_Database_Name_Here! O! Q! s) |' ^4 o
- Hostname=The_PC_the_MySQL-Server_is_on
' e. v+ p, F5 V - User_name=User_name_on_the_MySQL-Server
9 G9 M3 P6 y3 g - Password=Password_to_go_with_above_user_name
: d9 E5 N9 c+ |% K0 g7 q - GetDriverFunc=getSQLDriverMYSQL
; r6 Y7 j8 b: ^5 L% K. A8 B1 A2 F - VendorLib=path_pointing_at_your_mysql_vendor_lib) G. e0 F# \* N @9 A* H3 q
- LibraryName=path_to_libsqlmy_libary
/ d, }, V- H. u- w) ?5 ]2 r - Active=1
2 v- s5 H, l; C2 a; f( l8 m - ---cut here---
6 L2 i- J+ q: ^, h, d b) y - In my environment (a linux box with a MySQL server running locally) I have:. q$ M* V) W# }( `* [) O- j1 Y
- ---example---
3 h2 I$ |: @& d( K1 E Z - [DBEXPRESS]( X1 o H/ V$ ]. S3 C x
- sqldir=mysql_sql
. O. c7 y( h9 f* d" n2 r+ { - Drivername=mysql
. r5 i, o5 \9 K5 l. E - Database=test Q; d1 e8 Z/ I8 n
- Hostname=localhost; {) d9 ^0 G! w& x9 n* R0 M
- User_name=testuser
' f Y& e& a8 B - Password=my_password
2 f+ |) X0 x) u D% B - GetDriverFunc=getSQLDriverMYSQL
. r: O9 { T1 x5 Q; A! S% Y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- k0 m; V4 q! Y" e* H7 X& O1 R8 p
- LibraryName=./libsqlmy.so
& d9 R* h6 D* u# n- T4 l$ o - Active=1
( q, h% O" Z5 X, y5 L7 g - ---example---( `5 Y2 q, f, @) u4 c1 D8 k
- 2 m7 |# E! G. i
- On a windows box, also running the MySQL server locally, it would be:
+ |& T9 |9 {0 s1 X - ---example---
$ ~( s. ^1 U$ t+ @7 ]# V0 M% @ - [DBEXPRESS]+ W$ @! ?: L: N
- sqldir=mysql_sql
# J, n {6 e/ d2 p* q2 s7 g - Drivername=mysql
6 u, I7 x7 h4 F" e( o' V - Database=test
6 L" `1 F9 V; J, O! q% C - Hostname=127.0.0.15 p; k6 V# b* R( Z! z& R2 J
- User_name=testuser2 K5 g- t( l% ~7 ]. ]# Z3 `) q/ l
- Password=my_password- ?% s* R& b* K; Y- G
- GetDriverFunc=getSQLDriverMYSQL$ |* v2 S- q: R' e& I
- VendorLib=libmysql.dll
3 u; R( Q9 p: o# m3 V) i - LibraryName=dbexpmysql.dll' c: x7 N8 k9 N3 _4 {5 T) o
- Active=1
2 Q l7 x. }1 X( g$ [& b# i - ---example----
9 |/ x* k. {1 _1 s1 f9 i9 _ X& x) n - - written 02.03.04 by pwk.linuxfan/ h8 g- V3 E7 j) Y) B8 M
- : F" k3 [5 f5 U7 P& S+ s* ]: y3 L
复制代码 |
|