|
|
麻烦翻译一下,下面这段文章:xhan
0 J. | ? B, S- o4 p
* s; G& u1 ]' g$ m8 N5 b) ^8 M- & j" [( ]' Q& d
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ Q1 E) Q1 u4 n7 ]$ c7 j
- 3 U/ R( g, {0 U4 d% x1 [* J
- ### What we need ###
, {. S0 J7 N, k1 o4 J/ x - Naturally, we will need a MySQL server to store the data for us, this document
- J/ v7 F4 s6 k6 \; A. I - will not explain how this can be done - there are documents out there for the
o+ ]3 A( Z: F) Y - interested. The requirements include a (empty) database for TeamSpeak to use6 O' n% {: W( o$ e4 {. R& }
- and a user account (username + password) that has the permissions to do stuff
$ v% A$ e5 w( c - with the database. Additionally, you will need a vendor library installed on the
. W' F( A3 ^. w6 l) p C* D% D6 @ - local machine, this came with my MySQL install. i7 t9 w; w D4 E8 X" U: k
- These instructions will not tell you how you might transfer your data from the0 q) f! ]$ u1 o, u9 s! l
- SQLite database to the MySQL database, we start with a clean and empty MySQL0 j. }' t% @7 \! Q
- database.9 G* y9 h, e6 O/ t) \9 s- C4 k; b
- Some users have reported ways to import a SQLite database into MySQL, but at* t6 k) T% o( P+ r Y
- the time of writing, there are still too many issues - check the current status
. {& y; v0 h, G - in the TeamSpeak forums if you are interested.
+ F: Z$ F7 `" d# `- m$ d( { - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
/ b2 {5 X# P. p$ O, E6 _1 s5 m - Borland was used. This driver can only interface with the client library that ' }/ L. O5 f4 m- V) c. `3 {
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% f C" a6 D# i - client library - basically all you have to do is to use a 3.x client library as ' d0 Z! x& R) S/ g4 z- I
- "VendorLib" and a 4.x database to connect to.
1 D, g( i/ s0 b - If you need more info about dbExpress, you can contact Borland.: q* S9 H" @2 m( m( `: K
7 I2 A' J, t! j4 d- ### Doing the work ###/ `5 A0 k/ p2 n. |+ O% z; N8 {4 t
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all n5 v! i7 f1 F& h
- the perquisites right, just open your server.ini file, and add this section at
1 U0 t V# x+ H - the end:
! }6 q! u m' z6 L - ---cut here---
/ Z# V( m; p4 i( k! R- O - [DBEXPRESS]
3 i( R- Z2 ^1 |& n* W$ @7 R6 | - sqldir=mysql_sql" z! W$ j G, h
- Drivername=mysql* n1 I* P3 Q) O% C8 _) ^
- Database=Your_Database_Name_Here
: _& }& D4 h# d" H1 C4 n: n - Hostname=The_PC_the_MySQL-Server_is_on
; E2 p7 q" J) M$ W0 W; J- d - User_name=User_name_on_the_MySQL-Server
" r, S% ^4 ?$ ?0 ]% h$ { e/ I5 z. @ - Password=Password_to_go_with_above_user_name1 N5 f5 H6 F# `
- GetDriverFunc=getSQLDriverMYSQL
3 x4 Z- U3 |! i; W* B1 ? - VendorLib=path_pointing_at_your_mysql_vendor_lib' F6 l6 B! q/ ]9 M. \
- LibraryName=path_to_libsqlmy_libary0 u% d5 G" E* K) h* }
- Active=14 ^! T! q2 g, ^
- ---cut here---4 L9 }5 [0 M* K6 F7 j: B
- In my environment (a linux box with a MySQL server running locally) I have:$ I) W+ O, }% C* ~% V9 m' t# g8 w
- ---example---! v3 C2 z7 ^3 W! h; G4 P) F9 Z
- [DBEXPRESS]7 e- `/ S0 Y( _
- sqldir=mysql_sql' z x+ V% o3 O# S, v I( j- o, C
- Drivername=mysql9 @4 Y0 j! B3 s& V2 r9 x
- Database=test
; N8 m, I# C: S7 e - Hostname=localhost
, v, M" i) ^0 ?' W4 V - User_name=testuser
6 T" D& Q! @$ C, d- k - Password=my_password6 s* Z! N/ K9 W/ p. ~
- GetDriverFunc=getSQLDriverMYSQL
$ T/ D4 f1 |2 c# O; w - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0' d2 H8 c# ~/ ^5 O/ A* m- `+ |
- LibraryName=./libsqlmy.so7 a- ^- A( X5 @6 K" X* |: Y
- Active=1
7 j! l/ Q& N& P. D - ---example---
/ T+ h* z+ V0 s - * U& J- G9 t6 z, N" d" h
- On a windows box, also running the MySQL server locally, it would be:
2 w' l# T: ?! O. x4 ` - ---example---7 e% `/ ^& n1 C
- [DBEXPRESS]" P8 H$ X3 f* {9 J, L# {% [0 r7 M }) ^
- sqldir=mysql_sql0 U6 X% _7 N, ?9 ~9 z+ P8 ^. h
- Drivername=mysql9 k% q. n/ w5 s1 M( ]8 [1 D
- Database=test
; P* o# ]4 {' k9 M, m4 X - Hostname=127.0.0.1
4 i( {$ d, U* x4 x3 I; m! R0 p - User_name=testuser3 h2 t9 v$ L9 A4 s: M$ _; \# {7 n
- Password=my_password4 @6 f- r% i. X+ v* y
- GetDriverFunc=getSQLDriverMYSQL9 {; T% Z$ {1 r+ P, d! z; V* u
- VendorLib=libmysql.dll
, U8 {0 M# q% D! V( M - LibraryName=dbexpmysql.dll
' }& g: I" M9 z& x - Active=1, }/ ]5 i; ], Q' Q( C3 d
- ---example----7 R0 G7 N, R$ M) _
- - written 02.03.04 by pwk.linuxfan
2 F5 f5 R, b7 F g% q
( F; r- P1 D7 a7 a0 |2 S% a
复制代码 |
|