|
|
麻烦翻译一下,下面这段文章:xhan
4 D( x5 `0 f5 k; a1 H, V! Q9 ~6 g! n5 m# {% U
-
+ l! I7 O+ t7 L# d1 Z. F" U - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ u2 o/ ^. j3 }. O! F9 `* F- Q
- J+ t+ k' T0 R+ j+ d* ~
- ### What we need ###
- ]1 @4 i' f9 f1 x* E# P - Naturally, we will need a MySQL server to store the data for us, this document
0 A5 \/ H: t, u* a2 l, I - will not explain how this can be done - there are documents out there for the
0 z! Q: G+ a9 W+ \: |9 E$ L - interested. The requirements include a (empty) database for TeamSpeak to use/ Q0 ^- n" Z7 }3 T( k2 @5 P
- and a user account (username + password) that has the permissions to do stuff
0 H' o; H" q4 B6 D4 ]9 B - with the database. Additionally, you will need a vendor library installed on the
- y: q' H5 G1 O6 i% q - local machine, this came with my MySQL install.
! B/ P" \3 U4 g! ^% j* ] - These instructions will not tell you how you might transfer your data from the, x) K+ l% s% Y- D+ M
- SQLite database to the MySQL database, we start with a clean and empty MySQL7 d4 M8 A4 R; A9 r- ?
- database.
) @* l9 ^( y, s& \6 z& G - Some users have reported ways to import a SQLite database into MySQL, but at8 q3 `: j* c4 p" D! K: Z; ~
- the time of writing, there are still too many issues - check the current status
3 F( U. ?* T1 o+ L: V2 D - in the TeamSpeak forums if you are interested.
. s5 Y( p) {7 i3 k - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 a/ ^; d1 ^( j4 A. d4 H8 U
- Borland was used. This driver can only interface with the client library that 8 l* r- B' K4 i8 U" P: ~3 i3 f( U
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) I5 m' ~9 n. ~* s. j9 Z9 i
- client library - basically all you have to do is to use a 3.x client library as
, X0 f: S, _# e* `+ T - "VendorLib" and a 4.x database to connect to.8 T7 {6 L' |% p' e- ` Y2 j
- If you need more info about dbExpress, you can contact Borland., I; f# X( Y( U, w* {, U% B R
; {7 u3 t8 {- r0 J7 Q1 b6 X- ### Doing the work ###
! u* m; T9 p5 p - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; w0 L7 b6 Q/ j9 D) O( K6 E
- the perquisites right, just open your server.ini file, and add this section at
. N1 V g: W5 @" g# | o. @1 h - the end:
( s' B1 l; T8 e5 G - ---cut here---
: n$ v& S9 [3 G8 o0 ^& x - [DBEXPRESS]
$ M) O3 u4 o+ f5 O4 W: M - sqldir=mysql_sql3 A2 @6 x a/ U6 `0 S
- Drivername=mysql
: d3 `2 G5 P+ Y* F - Database=Your_Database_Name_Here
( U% V8 t' ?5 ~( C8 @% k - Hostname=The_PC_the_MySQL-Server_is_on2 M& P1 R5 S5 U2 I) ^
- User_name=User_name_on_the_MySQL-Server
2 j9 N! X- \% ?4 u - Password=Password_to_go_with_above_user_name, g4 F4 ^. {/ y/ d& A, ?
- GetDriverFunc=getSQLDriverMYSQL$ ~. r* y B) X% p6 D
- VendorLib=path_pointing_at_your_mysql_vendor_lib
0 s/ j8 Z- P7 l% ]5 O - LibraryName=path_to_libsqlmy_libary/ _& f* U/ H* X# K' b' ]
- Active=1
& X6 I" | ~+ r O - ---cut here---
! M- i" |4 l6 T& a - In my environment (a linux box with a MySQL server running locally) I have:( w% T( O: M: R9 T/ }) h0 h
- ---example---, C4 ?# B, W% O: S% ]( s; k6 T
- [DBEXPRESS]1 n! v/ f. ^- P0 ]5 W3 }' l
- sqldir=mysql_sql% }$ Z+ l; N' N& u9 y3 k
- Drivername=mysql# K! ^1 k/ D. ~# q& D( s
- Database=test. ~5 g' u E: L$ |, b
- Hostname=localhost: c$ Q# s5 J% e
- User_name=testuser
* P1 a' m, e+ F( ]2 b) d9 Z - Password=my_password/ E$ G4 X2 N! K
- GetDriverFunc=getSQLDriverMYSQL. D+ ^, \$ R6 a! y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! ` [6 A4 D k2 K) f1 G - LibraryName=./libsqlmy.so! c9 y7 g) _+ E+ o
- Active=15 B; J3 K& L& u6 O3 {# z7 d
- ---example---9 p1 F$ k- f4 V0 y7 k8 A
2 @, z# `% H5 |( N- On a windows box, also running the MySQL server locally, it would be:
* Z, e4 ]) _8 R: ]! S' n( T - ---example---
' B( H: Y; ^6 k0 i! Q# L - [DBEXPRESS]( A. n1 b& h- @# u! L
- sqldir=mysql_sql
% K1 _9 u$ \. } p0 ]( r! K4 e5 \2 t - Drivername=mysql# T# `7 e4 o, T! |
- Database=test
1 y6 v! u1 I5 g! Q - Hostname=127.0.0.1
! {4 p; q! b$ {) `% v: U# l - User_name=testuser, J9 |- f& P5 u# o% b% `
- Password=my_password! H: j& H+ k0 u3 M1 L/ E6 }
- GetDriverFunc=getSQLDriverMYSQL8 t1 T5 s; O0 U3 s$ I
- VendorLib=libmysql.dll
4 |' ?0 o, Q/ T/ K! `9 Y - LibraryName=dbexpmysql.dll
: P+ z, X6 W% ^! \ - Active=1
2 u( o! v; Y q; A - ---example----- s0 q7 k+ ~* W( _
- - written 02.03.04 by pwk.linuxfan
# C% l- Q; X3 D, ]5 S4 S4 f
# D% @+ x6 T' n; ^/ M" p
复制代码 |
|