|
|
麻烦翻译一下,下面这段文章:xhan
w( M3 [" n' G5 {
) d5 W' |0 n1 R4 G+ ]; O- 6 g u. _4 n0 ]4 ]0 j2 u0 S! P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
% f5 D: a4 B3 _, x7 w
- D* m* Z# }0 i) ~- ### What we need ###$ @+ j1 Z6 i$ u
- Naturally, we will need a MySQL server to store the data for us, this document 9 a$ e( J7 Y8 \' d
- will not explain how this can be done - there are documents out there for the 7 N' ?; R! n4 V" N+ }+ s
- interested. The requirements include a (empty) database for TeamSpeak to use, [# v+ a7 C% g: f" s! H+ p
- and a user account (username + password) that has the permissions to do stuff
( V6 r) C; G/ z3 ?5 f5 V - with the database. Additionally, you will need a vendor library installed on the$ Q8 C. k- }/ Y! I: l
- local machine, this came with my MySQL install. g$ `- A1 B) x! }- T: p, K( H
- These instructions will not tell you how you might transfer your data from the
0 `* m7 l8 n# t7 B - SQLite database to the MySQL database, we start with a clean and empty MySQL
; P+ {4 }" P2 w, l! R; u& T9 F - database." r% j$ A0 K, S( e. _6 i, H
- Some users have reported ways to import a SQLite database into MySQL, but at
( o0 u1 Z/ _) w' [ - the time of writing, there are still too many issues - check the current status* a* `- W3 K+ F) Z
- in the TeamSpeak forums if you are interested.
2 J! ]1 u: H9 z" y% B - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) K6 E8 F% C( G% r! x: Q- ] - Borland was used. This driver can only interface with the client library that
7 X; C. U" g" c% c% b3 f - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 k- y D- r% I# Z8 ?1 \! c9 H+ E - client library - basically all you have to do is to use a 3.x client library as ! i2 b0 i/ h2 v3 z& Y
- "VendorLib" and a 4.x database to connect to.- a, y; Z9 o" T8 f$ b' f
- If you need more info about dbExpress, you can contact Borland.
6 n; }- y3 p$ z0 p; a1 Z0 u
2 k2 K, E# k2 o% ~$ {" \- ### Doing the work ###* A: \; H9 K3 ^1 k! {
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: q6 G! Y9 l. v+ K - the perquisites right, just open your server.ini file, and add this section at6 g% C1 d* K6 A; x
- the end:
0 U, g; Q/ E+ j1 p - ---cut here---
# i& n# q6 F# [4 I( R - [DBEXPRESS]
/ A/ s- }! } s3 { - sqldir=mysql_sql8 a) m5 ^8 p! {# f
- Drivername=mysql
/ V$ q5 Q. g J5 [2 ^, H/ s2 x, r - Database=Your_Database_Name_Here
2 j. G" c" l# C+ I - Hostname=The_PC_the_MySQL-Server_is_on
! m. E5 R" [: {4 T - User_name=User_name_on_the_MySQL-Server/ [6 x& o4 b1 X3 r
- Password=Password_to_go_with_above_user_name6 k, d- U" {5 y' Y' p. X
- GetDriverFunc=getSQLDriverMYSQL _8 p) K& K- \. o+ P7 y
- VendorLib=path_pointing_at_your_mysql_vendor_lib
9 `6 S2 A2 q4 r6 R# W - LibraryName=path_to_libsqlmy_libary ]+ D. j4 k+ B( q! w
- Active=1
; F4 a. z) h! U0 k* c! I7 b - ---cut here---9 F# |# s% V: L9 i$ k
- In my environment (a linux box with a MySQL server running locally) I have:
* C* I/ W* U. b7 | - ---example---
) e3 Z5 }4 O- O* W - [DBEXPRESS]7 J* D0 B5 ]; i: b. x3 @. i% x
- sqldir=mysql_sql
3 X: _8 [) H& B5 r" _2 w - Drivername=mysql
+ ?: ~5 \. ^1 ^. V# ] - Database=test
$ e2 ~" e F; O7 J7 i - Hostname=localhost) |0 K2 T- ]" ]2 ]! X, _0 L
- User_name=testuser
* f$ j" v2 @1 C4 R g. m' A - Password=my_password' a$ F$ z" f0 H& m
- GetDriverFunc=getSQLDriverMYSQL8 H+ }. i# L/ @( j2 q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 z4 t" _# F0 q+ K - LibraryName=./libsqlmy.so
6 o- F* Y# H( L) g- _7 G- X - Active=1
0 N$ F$ ~9 y6 R' c" E+ p; X - ---example---
- b& w1 ]# s; }, z2 ^1 w. Y' J i
1 g/ g) Q/ c6 R, ?, ]: S- On a windows box, also running the MySQL server locally, it would be:$ \* ~1 ^$ L2 x# {* F$ U; C+ n
- ---example---' z0 I: }" w: p ~# A
- [DBEXPRESS]
/ R' }& Z6 X. d- W8 P - sqldir=mysql_sql! p* a5 U6 }% s3 s
- Drivername=mysql& Q( T* b2 z7 D/ E
- Database=test7 D5 @) Q( C. O8 b
- Hostname=127.0.0.1# e8 q% ~" M' `" x7 }
- User_name=testuser
$ U/ _( k0 _ b/ f* D2 _. \ - Password=my_password
, L' P4 L& l( P+ z/ f - GetDriverFunc=getSQLDriverMYSQL8 p, i% }$ g- I+ P$ c) M' w( H
- VendorLib=libmysql.dll
- C/ X7 f9 I. C1 M4 e - LibraryName=dbexpmysql.dll
) U1 f5 e, W- N - Active=19 x# R& U+ C5 a
- ---example---- D4 k9 f8 T/ M1 S) e U! _! P* E
- - written 02.03.04 by pwk.linuxfan
- F& s q7 k0 b# F1 J/ p V# V - 9 P3 r5 X/ C7 Y) w$ e
复制代码 |
|