|
|
麻烦翻译一下,下面这段文章:xhan
# P' w. }# H5 P/ r8 c! C* M0 W" ^3 n. i& V. Q1 o
- / @3 C6 r# @2 t
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ V9 b% D; n* i* z- h
- 1 l8 [3 J2 [: W* X3 j+ w- `
- ### What we need ###/ ?" B2 m5 ^7 _1 D: ~; U! Y+ \
- Naturally, we will need a MySQL server to store the data for us, this document ! K0 ]2 M* ]( @+ k+ L, P) S
- will not explain how this can be done - there are documents out there for the
9 [5 q |7 ?/ N - interested. The requirements include a (empty) database for TeamSpeak to use! K, H' L$ w. s6 W" e% Z( N
- and a user account (username + password) that has the permissions to do stuff* u$ M/ g5 P. {: z3 u
- with the database. Additionally, you will need a vendor library installed on the0 C6 h" k* ^2 a, C; @1 x/ ^4 i9 I
- local machine, this came with my MySQL install.
' S2 l- B" O% J3 n2 E8 u9 I - These instructions will not tell you how you might transfer your data from the
N, o4 p2 q8 k, G) Z s! @# r - SQLite database to the MySQL database, we start with a clean and empty MySQL
+ o5 u* }4 _3 f l - database.& t5 t# C% L6 T
- Some users have reported ways to import a SQLite database into MySQL, but at( x# X4 n: t! T0 L% h7 p# J
- the time of writing, there are still too many issues - check the current status
, D% f9 |8 P% F: ^1 Z - in the TeamSpeak forums if you are interested.
: p9 v* @: s/ u' a/ S8 U - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& K) s7 C! X8 |- y
- Borland was used. This driver can only interface with the client library that 3 o1 D" |2 ]# C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% B# V* r* Y* K" {( T
- client library - basically all you have to do is to use a 3.x client library as # }! Q; n, N0 U7 M+ L. T
- "VendorLib" and a 4.x database to connect to.1 H: c0 a6 `% ^" H2 M ]
- If you need more info about dbExpress, you can contact Borland., y; q1 V! G/ v7 {" V. t( I. E8 q4 z9 j
- # c ^$ a% s6 p" E9 M t
- ### Doing the work ###) Q( K4 M+ u r3 S7 a5 M; S
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ Z4 y4 z8 U) ? ^- R2 e4 R2 d/ S - the perquisites right, just open your server.ini file, and add this section at
- W( e) D- S- M2 f* ~% U N - the end:* K* W, ~: P* a6 v
- ---cut here---
( U# c1 e0 h* K' K& D& E0 w - [DBEXPRESS]
+ M1 H; y+ O: _( | - sqldir=mysql_sql
4 t, B/ w1 p) C& a! Q% Z- Y2 t - Drivername=mysql
1 {0 O# Z1 P: H% n5 [! ]: g - Database=Your_Database_Name_Here
1 b2 }5 N, B) s( S, F - Hostname=The_PC_the_MySQL-Server_is_on
6 v" \: O4 z5 E! ^& `6 y( T- `) I - User_name=User_name_on_the_MySQL-Server- c8 d& v8 h7 b
- Password=Password_to_go_with_above_user_name
1 x5 O# t) H# L, Y) Z - GetDriverFunc=getSQLDriverMYSQL- d4 @6 g$ }9 j: ` u
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ _4 C% ^9 S, u - LibraryName=path_to_libsqlmy_libary
2 ~: K) r/ @, r - Active=12 g5 R$ B! a/ c
- ---cut here---% e# }5 E! w* c8 ?2 L' B
- In my environment (a linux box with a MySQL server running locally) I have:
. p/ g8 G2 P3 L' t/ k. { _ - ---example---
|5 K# Y8 i6 d( L& { |' q - [DBEXPRESS]/ V8 [5 ^0 R4 e
- sqldir=mysql_sql' b* R, `, P7 e& t! S; S. a8 f- N
- Drivername=mysql
; t _; [9 ]9 a j: W% l# }9 v4 ? - Database=test1 c8 ~# O6 L7 \# @- D3 G
- Hostname=localhost0 i- H" C. v1 K7 ^+ F" E
- User_name=testuser; k/ v9 a+ V/ M/ N; b# _
- Password=my_password. O8 R/ o6 p: Z+ M
- GetDriverFunc=getSQLDriverMYSQL8 _, Q. u2 X0 S, S2 a
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 ^4 Z& ], ]5 k# n6 @& v
- LibraryName=./libsqlmy.so5 v6 u0 D+ T# J R
- Active=1
. P" x; i4 K& o$ U$ @9 d1 E - ---example---; D4 x9 a, [+ U, d- H6 ?
! M2 @, S: ~+ w* ?' V- e! @5 }- On a windows box, also running the MySQL server locally, it would be: ~# l! y/ k& |* u; O
- ---example---$ a5 Z! u1 E9 ^, `5 I) u- V
- [DBEXPRESS]
1 n y9 { {0 \' ]% Z7 I- a9 u - sqldir=mysql_sql
1 Z( z7 x" o9 l8 U - Drivername=mysql! ?+ v- u8 ?5 s P' v% ^( a
- Database=test" T6 z2 P( j5 _2 {3 ?) @2 I
- Hostname=127.0.0.1
. n' @: o$ O# o4 m, E - User_name=testuser
, w1 C4 s. E2 V' i: ^ - Password=my_password
) ~+ p- C7 ^+ R" [ - GetDriverFunc=getSQLDriverMYSQL
. T4 j! {# z: [ - VendorLib=libmysql.dll4 G+ d2 ~& F! z, w/ f
- LibraryName=dbexpmysql.dll1 N, M& M1 @; S+ g9 m! `3 ~
- Active=1: c( \8 Q. C% T! l! k
- ---example---- m+ t1 q# C5 `9 J
- - written 02.03.04 by pwk.linuxfan- i3 r' L+ U4 J' x1 j
* |- Z6 X& k% U( h
复制代码 |
|