|
|
麻烦翻译一下,下面这段文章:xhan p, u/ O7 }8 |% H Q: h) V
" T z% N0 ^) u) W1 x
- 0 M7 V: b2 r) C, a' x+ x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ G. m: G( k0 X9 e4 A
+ i# H& L! z" F& K. q! I" s- ### What we need ###
2 M- F& Z$ ^, V2 i; U* V* ^ - Naturally, we will need a MySQL server to store the data for us, this document ! ^/ V8 N! i' I$ i! Q n
- will not explain how this can be done - there are documents out there for the
/ L5 D- C2 @2 P& P& U - interested. The requirements include a (empty) database for TeamSpeak to use
+ V( Q7 |: H2 ^ U; Z1 P - and a user account (username + password) that has the permissions to do stuff7 t3 B3 z/ `/ g7 E
- with the database. Additionally, you will need a vendor library installed on the: l; n# h% P+ v& c' T4 j, c" a
- local machine, this came with my MySQL install., m$ ^4 }. w; d# ~
- These instructions will not tell you how you might transfer your data from the
2 Z4 z: }* ^5 j% b# F' O$ K% M* ~ - SQLite database to the MySQL database, we start with a clean and empty MySQL$ o# r/ e) _0 Y% }0 t
- database.
. O6 x4 v1 O1 s* \9 S8 y0 T) B - Some users have reported ways to import a SQLite database into MySQL, but at
. a2 E: M, D" _! G8 I' H8 |+ I) C - the time of writing, there are still too many issues - check the current status
/ }+ i. c4 ?5 w) G z$ q+ k - in the TeamSpeak forums if you are interested.5 [: N3 V+ F! }! Y) D' @+ [8 {7 K
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ H5 n3 a2 Q% M - Borland was used. This driver can only interface with the client library that
2 {. @- b% ?- W% t$ M# \ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 v0 k2 P) O* M9 `! a& @ - client library - basically all you have to do is to use a 3.x client library as S7 ?1 \; G( D c5 o/ x1 j6 N' _
- "VendorLib" and a 4.x database to connect to.
! e6 o' ?8 S1 w+ t/ z5 F4 w - If you need more info about dbExpress, you can contact Borland.4 o* A3 a% C9 @; x8 c9 J% `
, L+ t4 h3 @& `" r4 x- ### Doing the work ###! {+ h$ W5 C: n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
8 p" K7 z5 }/ e! D+ {3 | - the perquisites right, just open your server.ini file, and add this section at
/ c% `! x; ?# @$ ^/ \, }( V. V - the end:
' R1 Z) z& u- s& k, }& L$ [: j - ---cut here---+ P8 c( H# ~! g% ?
- [DBEXPRESS]
" x1 a/ l4 K( R/ R0 r4 o3 E7 T - sqldir=mysql_sql
* E M+ l) h( T' P& H( V0 q6 x. P W - Drivername=mysql) N! i ^+ j K
- Database=Your_Database_Name_Here
# x' d% C$ a$ I& O) H' I - Hostname=The_PC_the_MySQL-Server_is_on
7 U: `6 O' J2 P' j2 a) H - User_name=User_name_on_the_MySQL-Server
8 I# K# Y% Q ?( H2 @ - Password=Password_to_go_with_above_user_name
W& t8 O8 |" T5 H - GetDriverFunc=getSQLDriverMYSQL/ j+ v7 x$ B0 m5 x; q: J" A$ O
- VendorLib=path_pointing_at_your_mysql_vendor_lib
2 T( ]) t' b n$ H0 J7 \ - LibraryName=path_to_libsqlmy_libary* G) _( P+ C" ?% Y$ D
- Active=1
9 ~0 d5 A% E1 K7 P' f' S% E3 b - ---cut here---
) N, w3 p' T) a. _ - In my environment (a linux box with a MySQL server running locally) I have:/ R9 p0 l' m! R
- ---example---
- N) B& G/ [5 ^( i - [DBEXPRESS]; a8 l& o* s* h8 W! f, C. j- w t
- sqldir=mysql_sql8 a& C; ~, A; @6 J& i3 q
- Drivername=mysql! A+ U. ^8 M, N8 u
- Database=test, B. {3 w+ {" S/ q7 J
- Hostname=localhost+ J- ]7 D/ T3 h! K
- User_name=testuser6 U9 L$ v( N/ |
- Password=my_password
* L0 V' k' k: ^& { F- |7 X - GetDriverFunc=getSQLDriverMYSQL' O. `* X' W9 I! Y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 W" i* V. V8 c- A% w
- LibraryName=./libsqlmy.so( H+ x! y) |8 A1 U% X4 `$ L
- Active=1
5 C. P' E2 T: s - ---example---4 R$ Z) @) l# p3 s& T1 U" w
- # z. X7 s' w$ h4 E" e1 B8 E& y' _+ P( N
- On a windows box, also running the MySQL server locally, it would be:/ U# F. h2 ]2 J0 F
- ---example---
( }" Z$ Y: g. Y1 j# k4 m2 g - [DBEXPRESS]9 \5 `! v' D8 B. n! @5 O
- sqldir=mysql_sql: ?4 b1 o/ C( b* O; o L: H6 O G
- Drivername=mysql
# x1 d: R4 b- x6 [9 P& _ - Database=test4 J: p6 X9 ~% x
- Hostname=127.0.0.1
+ _. Z6 B, v% D3 Y' J - User_name=testuser! E* d; ^& c) |4 R: Y0 H
- Password=my_password; B& s2 e( s% ~, ~+ U
- GetDriverFunc=getSQLDriverMYSQL* q5 [* u1 s4 _4 |0 i c
- VendorLib=libmysql.dll
/ ~' b/ h- C4 [% y: X) L - LibraryName=dbexpmysql.dll
$ g3 A2 {& ?* V( C8 O - Active=1
. Z6 c4 V9 B+ {- k5 o - ---example----) Q* j, k4 @! T; N
- - written 02.03.04 by pwk.linuxfan
- f: F5 E$ Y, h' h+ E4 o - , h3 A" m2 R+ P3 J8 [! }+ r. n
复制代码 |
|