|
|
麻烦翻译一下,下面这段文章:xhan 8 {, F9 w/ [3 \
9 z; D d6 r4 [4 a-
% w6 N9 k' w( c" x0 u/ h$ S0 ?+ ? a6 A - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 P/ r' j: f+ B% T$ y
- 3 U) o4 P1 R" g5 V* |
- ### What we need ###
5 \3 T! r% p* H+ X% y* G - Naturally, we will need a MySQL server to store the data for us, this document . W. C" T0 W5 }0 a. g
- will not explain how this can be done - there are documents out there for the
! P$ w- S% s7 X& F7 o# l - interested. The requirements include a (empty) database for TeamSpeak to use* b% N# t' \ _ D0 i3 x( s3 f- q
- and a user account (username + password) that has the permissions to do stuff
, p) B0 @- w! D2 S8 E - with the database. Additionally, you will need a vendor library installed on the3 v: [( \- b" o
- local machine, this came with my MySQL install.9 i) y, ^& i' `$ d$ O6 Z
- These instructions will not tell you how you might transfer your data from the! b. R. I/ j. f) n; b
- SQLite database to the MySQL database, we start with a clean and empty MySQL
, S: }. `3 q0 e* d) ~5 } - database.9 e* N; Y7 G, o6 `
- Some users have reported ways to import a SQLite database into MySQL, but at: [* o8 @; ~8 M
- the time of writing, there are still too many issues - check the current status% J# f9 W( i3 p/ p
- in the TeamSpeak forums if you are interested.
5 ^' u6 C. d4 X# d4 @7 j3 t" t8 X - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
8 K1 W; @4 J- L0 g2 ~* o9 V - Borland was used. This driver can only interface with the client library that ) p' M8 S7 b2 n9 u
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this* A5 I- [$ N' { D7 Z
- client library - basically all you have to do is to use a 3.x client library as
) e9 Q$ C- A4 C. b" h3 q7 k2 T: D - "VendorLib" and a 4.x database to connect to.
! I i, S7 |. ~+ ?: Q7 Z6 ^ - If you need more info about dbExpress, you can contact Borland.
& J$ w! ^1 v7 E4 a& a3 D - * V' Q. b% J5 a% X( U) n' x4 s
- ### Doing the work ###
: ^! C9 T# z" B5 X& R, {; c - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( E& E, Y/ p. }+ G5 Z+ @+ h4 d - the perquisites right, just open your server.ini file, and add this section at* p3 w+ O% g7 G3 f7 y1 p
- the end:
/ I1 ]- \8 y9 p9 ], q - ---cut here---! B( a" x l, z4 l8 F% w; _$ H/ k
- [DBEXPRESS]/ w2 R) t2 `, N7 m( J" D- p
- sqldir=mysql_sql+ C+ K% w) ?/ q5 r5 n
- Drivername=mysql
/ Q6 _2 ^' J" t) H; }; A - Database=Your_Database_Name_Here
* t N2 p! H; l0 M% t* y+ ~ - Hostname=The_PC_the_MySQL-Server_is_on
3 }% L) b% ]( ? - User_name=User_name_on_the_MySQL-Server
, k1 C+ Z1 D* }6 R$ r - Password=Password_to_go_with_above_user_name
. z6 {6 t3 A! y - GetDriverFunc=getSQLDriverMYSQL* U. L- e' I; ?1 J/ J$ u% \1 w
- VendorLib=path_pointing_at_your_mysql_vendor_lib
: y3 o3 g# d" s0 P. @: | - LibraryName=path_to_libsqlmy_libary
/ x% l, k, ^ Q7 a$ G# J5 A - Active=1* F- j4 Q* w8 R% J" Q6 z
- ---cut here---
* {7 \* {) M9 w$ k! z/ l6 s) F - In my environment (a linux box with a MySQL server running locally) I have:
' Z8 K2 g; B5 F6 U( A/ y: o - ---example---
3 u9 W8 ?& F" k- J/ |8 ~ - [DBEXPRESS]
" Q7 F2 L$ c7 B5 d- V" a" ~& U) t' @ - sqldir=mysql_sql
& V, @4 r0 S) R. { - Drivername=mysql d; T0 S. ]9 P- k. t: w( d
- Database=test1 n. N9 L5 Y+ ^* E1 p- q% F
- Hostname=localhost
" r+ F( u2 y* X4 q8 K; z - User_name=testuser
! o0 N0 Y1 p2 |) \3 ^ - Password=my_password
% J0 R- u# y4 k# R' Q5 p) B - GetDriverFunc=getSQLDriverMYSQL% K. f6 [ _# |1 k
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0+ A# {) W$ J; x5 s
- LibraryName=./libsqlmy.so0 M0 M4 Y7 m4 n- |" ?8 r0 {
- Active=1
* t4 x8 R0 A: Z1 R5 C) V a - ---example---0 u! i7 C* t6 Y) @! W& X
. L2 S4 P B& @7 s9 j2 f- On a windows box, also running the MySQL server locally, it would be:7 W( Q% n3 v3 C. c$ R" v9 n
- ---example---
2 _6 F, g% `' g! G) }9 q1 D - [DBEXPRESS]# O+ L. a; m8 u" w! p
- sqldir=mysql_sql
( H5 M# n3 u7 {0 {: r* \# ~ - Drivername=mysql
3 ^) B9 a- n( w9 Z1 v8 Q9 C - Database=test, v1 T# F+ Z3 ]- F( B9 Y8 c3 B
- Hostname=127.0.0.1
% V6 {; L& u1 C1 o# f; N$ j$ ^ - User_name=testuser6 F# T: R( `( O' M
- Password=my_password
0 i1 m" S+ M$ b0 x - GetDriverFunc=getSQLDriverMYSQL
1 A$ T2 A* T x9 i - VendorLib=libmysql.dll1 [- O, I. \- W# x2 e
- LibraryName=dbexpmysql.dll5 L9 F8 U& e4 ?% z( }$ ~
- Active=1( k# m& m6 ^" h" _+ G1 U% \
- ---example----
/ U7 T0 W. Q1 K! Z; { - - written 02.03.04 by pwk.linuxfan! F ]3 `% Z, d1 _. S3 U
+ |' L# P% m' ?- d
复制代码 |
|