|
|
麻烦翻译一下,下面这段文章:xhan
: R+ D; @) B0 }) E+ M0 U0 [* p- X6 @* Q: g$ H
- . [& c7 k) b$ `+ ]. I1 \: w# N- e
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( }! |& z3 p- i U - 9 V7 K- w7 N- Y9 y' w
- ### What we need ###
8 I! b0 d3 A$ h - Naturally, we will need a MySQL server to store the data for us, this document
5 ^3 N6 w" `6 B( N. e - will not explain how this can be done - there are documents out there for the * X. n0 A- u5 M/ F8 D* L8 I3 O5 V
- interested. The requirements include a (empty) database for TeamSpeak to use6 w2 l. `/ I$ \( A
- and a user account (username + password) that has the permissions to do stuff
- Q0 |6 B2 M4 x7 i, g5 p - with the database. Additionally, you will need a vendor library installed on the
; F% `' p1 G% ~7 F - local machine, this came with my MySQL install.
& E3 q9 n1 O7 R" J/ T - These instructions will not tell you how you might transfer your data from the
. e ]! \: D8 t( {1 @3 q8 {2 H) N - SQLite database to the MySQL database, we start with a clean and empty MySQL
. c' U; Y6 `+ y6 ~6 s t - database.
1 l, a* `( N! t( A. A7 n - Some users have reported ways to import a SQLite database into MySQL, but at
; G6 Z$ G) ?. |& i4 T w - the time of writing, there are still too many issues - check the current status
4 Q( t7 A- s: m6 l% n; S9 a - in the TeamSpeak forums if you are interested.# T# I; t' X' O% }' L
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from4 r- Y0 ?; f0 g: p1 d2 q
- Borland was used. This driver can only interface with the client library that
' B' p6 R& j3 I% Z9 c - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! Y1 d7 i, L& I, l6 s
- client library - basically all you have to do is to use a 3.x client library as 2 }$ ~: i2 C+ V" b) ~, L s
- "VendorLib" and a 4.x database to connect to., b2 X4 g: Q, L7 N4 }& w% I
- If you need more info about dbExpress, you can contact Borland.
' J; ` h& o8 P& `7 i: I - : t2 C: S% [5 e* u. D9 @
- ### Doing the work ###
' ]$ ]1 O; M$ s) L' d- A - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all4 x8 q [8 k2 Z
- the perquisites right, just open your server.ini file, and add this section at5 p; Q" L( g$ v
- the end:& q8 N- X/ d2 {9 w: b" I
- ---cut here---
& u" X. b1 P/ s1 M2 Q1 A; S - [DBEXPRESS]2 }3 F5 l4 \6 z6 L; ~3 I
- sqldir=mysql_sql
: i% l5 c1 _: x5 \( l) q" D - Drivername=mysql
) @ u; a% N6 A0 l - Database=Your_Database_Name_Here
: s/ R3 n% R6 U9 k( k2 ]8 K - Hostname=The_PC_the_MySQL-Server_is_on
! x- ? K7 S3 E" h- g4 G t7 C( O! z - User_name=User_name_on_the_MySQL-Server
, `8 @+ v! L3 O1 y3 e& ]& W+ l - Password=Password_to_go_with_above_user_name' T9 o7 [ Y/ s
- GetDriverFunc=getSQLDriverMYSQL
& K0 h( A# ?) D7 V' R - VendorLib=path_pointing_at_your_mysql_vendor_lib: k+ o/ A6 ` y+ r
- LibraryName=path_to_libsqlmy_libary
' q$ e# m7 @6 b - Active=1* _; ]) j/ P7 G( t
- ---cut here---
- w0 j4 I4 Z4 R6 e1 h - In my environment (a linux box with a MySQL server running locally) I have:5 \7 {5 R1 r6 e* ?: `8 m! [9 O
- ---example---
+ F" U$ t) }" g# t& h, Q. n3 d - [DBEXPRESS]
9 [) z! B' B; l - sqldir=mysql_sql- w+ J. K$ v9 Z& A8 u6 {2 {
- Drivername=mysql
) z I) G" O9 r4 s7 G2 ], w - Database=test$ _; u- p0 b+ P7 A* t _
- Hostname=localhost! K% o+ C* Q$ M1 c, Y
- User_name=testuser
7 H$ t$ ^ R5 y9 g - Password=my_password! B9 k+ ?) F) O8 H+ K# o
- GetDriverFunc=getSQLDriverMYSQL$ J1 `5 d3 \% t, @3 }8 X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( j, t: ^2 t- w8 H9 c! k6 z
- LibraryName=./libsqlmy.so) @2 E' [# d2 r1 ]8 k0 b
- Active=1
2 o$ X2 R9 C, t; c, y& n - ---example---
! P8 A, R0 h# z
2 ^: S$ @: k$ j+ d) X2 Z- On a windows box, also running the MySQL server locally, it would be:4 f% N7 {, ^8 E8 w6 F, `2 j4 c
- ---example---6 J! w7 k) ?# K
- [DBEXPRESS]& B2 U, @- O1 r7 ]: g$ z$ J& C
- sqldir=mysql_sql# @; @5 E+ c+ c( m4 f9 Y. X! j
- Drivername=mysql
. p% O1 D' e" {# O& ~% z! t( t) c+ p - Database=test% r7 v" [7 V- r, e e; ~
- Hostname=127.0.0.1
, A3 b( l" s2 H3 K - User_name=testuser
4 X' f! |2 \. S$ x; T R, A - Password=my_password+ A+ ?- t- | p/ t6 R8 {" S
- GetDriverFunc=getSQLDriverMYSQL; ^5 o6 q4 E& J! p
- VendorLib=libmysql.dll+ c5 ^1 ~& b0 G6 P3 P& s% H/ ?
- LibraryName=dbexpmysql.dll
( b2 n g1 p. ]/ p- |# { - Active=1; g0 H: d+ Y4 s" @% E7 d) ]. l& M
- ---example----' q; J, q! e" | B
- - written 02.03.04 by pwk.linuxfan" P" B4 p4 ?$ v5 y9 ~; V4 Q
% Z( d6 E( H: ?+ D9 Q; [ h- ?
复制代码 |
|