|
|
麻烦翻译一下,下面这段文章:xhan
) b# g0 e6 S0 g& Y. P4 R& K- e B4 N
-
- c8 J5 [: F, v& \ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 E0 f; S& A( o5 a7 x8 {
, h$ Z/ I+ c) \2 g6 ]& E- ### What we need ###
7 v! n6 v$ X c' [$ k$ q6 \ - Naturally, we will need a MySQL server to store the data for us, this document " C: f' A7 A. j+ h( J
- will not explain how this can be done - there are documents out there for the
3 v, O W8 T: R3 ]0 G - interested. The requirements include a (empty) database for TeamSpeak to use
- E% ~6 M2 z: A+ K* G O! g" H - and a user account (username + password) that has the permissions to do stuff
2 y) q, ~8 o. u% @ - with the database. Additionally, you will need a vendor library installed on the8 D! R1 W& @7 g* \) W: T
- local machine, this came with my MySQL install.+ }3 l2 W8 W. G: K+ v9 G3 v
- These instructions will not tell you how you might transfer your data from the1 a; Y: W' e5 q
- SQLite database to the MySQL database, we start with a clean and empty MySQL
+ a# V% }4 H ?1 f - database.; j+ s1 [+ {5 h8 A8 S8 n
- Some users have reported ways to import a SQLite database into MySQL, but at
; i; @- j6 M2 w6 v' q, O - the time of writing, there are still too many issues - check the current status9 }9 ?* g2 K5 }0 H( z0 a: E3 U
- in the TeamSpeak forums if you are interested.# L. D- K) K- L' G1 Q
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
' W% L' E' k# M' K - Borland was used. This driver can only interface with the client library that $ R+ o( ^# ?9 w) _
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ c) q( ~8 n8 J7 ^ j - client library - basically all you have to do is to use a 3.x client library as / l B2 l! K% H
- "VendorLib" and a 4.x database to connect to.' t. Z: o( `: H# S/ _
- If you need more info about dbExpress, you can contact Borland., A. v8 S; A# A
- 6 U/ l: Z& a# A! j/ g0 {
- ### Doing the work ###0 w4 [* L. \- L1 a" y
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 M8 V: p1 b' K) n$ C9 ^* q/ e - the perquisites right, just open your server.ini file, and add this section at
1 w; y/ C" F% B - the end:
Z/ F4 O. J B' k& u" H( u - ---cut here---
4 S" i, Q+ _0 t! _7 D/ V5 a: ?1 g3 f - [DBEXPRESS]! ?5 F3 _( |+ N- E
- sqldir=mysql_sql8 H. ~: @$ {" f( s! e
- Drivername=mysql
+ c% M7 G% B+ X9 M- R; r - Database=Your_Database_Name_Here
" Z/ s# j+ l1 y6 m* l6 K - Hostname=The_PC_the_MySQL-Server_is_on
3 Z6 q. {% z' N! c8 B - User_name=User_name_on_the_MySQL-Server
% h' q3 H$ Z9 ? - Password=Password_to_go_with_above_user_name
7 ?8 H- F6 ^5 _ - GetDriverFunc=getSQLDriverMYSQL5 X, Q& y# I) _8 b
- VendorLib=path_pointing_at_your_mysql_vendor_lib
1 Q1 A! A( F1 B6 Y- {- q - LibraryName=path_to_libsqlmy_libary
* I- S+ _2 f3 O - Active=1
# Z1 m" k& O' H4 L+ P& i - ---cut here---
; r' g5 _ Q6 N+ X0 T2 ~" _ - In my environment (a linux box with a MySQL server running locally) I have:0 o; X( ?" k9 \% ]1 Y& D
- ---example---' d( o0 S' s( K3 b, R' E9 M: z* `
- [DBEXPRESS]: _. w8 i$ f, P* Z
- sqldir=mysql_sql
$ h2 g' f2 f+ ~ - Drivername=mysql, {4 a) S2 c: t9 }6 b/ a+ ]7 Y
- Database=test
# [! w# A! s, i9 q - Hostname=localhost
% R! V- G$ d( N* V - User_name=testuser
7 b. h) T- R, x% W& c - Password=my_password/ \0 l2 m7 U |0 V o
- GetDriverFunc=getSQLDriverMYSQL
$ W6 V% d7 `8 H2 R) ]( P' N& ~! r - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
6 n# ?6 T7 r: L! e! _ - LibraryName=./libsqlmy.so
& n0 e; X5 ?/ ~: }( p( k" b o& T - Active=1/ J# P! I* |1 G6 U$ Y
- ---example---# X1 x. N6 A# W
% \6 H6 |& k$ h+ A8 B3 i* q- On a windows box, also running the MySQL server locally, it would be:1 {' O' A& r1 l0 x0 n2 o, w
- ---example---. q& f) S/ r8 ~+ J' q3 l4 I* f+ n
- [DBEXPRESS]0 Q0 m/ L8 _2 Y
- sqldir=mysql_sql
) c8 X6 J& [- x3 K# | k- A$ j - Drivername=mysql3 G* F5 U/ s3 }3 [7 D2 l2 O
- Database=test
8 U( r! a( c3 H1 z8 ~9 O1 t - Hostname=127.0.0.1
9 S! N2 @7 U6 F! T( \4 c, E - User_name=testuser/ k& P! _- n% n$ P
- Password=my_password
4 H9 g. W/ Y! H - GetDriverFunc=getSQLDriverMYSQL5 h: z2 t$ D# {* V' @( V
- VendorLib=libmysql.dll
# ?+ A& X) i1 f& \# K - LibraryName=dbexpmysql.dll
' y3 E9 {4 D8 B) z8 V) q* F! Z - Active=1
" f! [4 i9 n! q - ---example----
1 n2 L& K4 _8 {$ B - - written 02.03.04 by pwk.linuxfan) q" a, M# a* v5 A, f$ d! ?
- # m* U* z- g% d/ b, D4 L6 v5 T
复制代码 |
|