|
|
麻烦翻译一下,下面这段文章:xhan 8 P+ E8 ]+ k& @( C( Y, k
, U* _) p, i: p6 W
-
% u1 U" F% t5 `& J; p+ K - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# |0 L+ b Z) N, K0 n - ! Y6 u6 ]" G. ^ A" c9 j
- ### What we need ###; e5 y' ?; |+ R F; h: N+ P; A1 ?
- Naturally, we will need a MySQL server to store the data for us, this document * j. R U+ x! J& p C) A6 S) r
- will not explain how this can be done - there are documents out there for the ; B* }. X( \# x& q
- interested. The requirements include a (empty) database for TeamSpeak to use
7 @8 P3 n5 V+ R( i# D- \' j - and a user account (username + password) that has the permissions to do stuff
& A9 B+ L- j1 ~6 O - with the database. Additionally, you will need a vendor library installed on the
2 y+ r, u* J( k! U - local machine, this came with my MySQL install.' _6 O9 _5 W- u( x
- These instructions will not tell you how you might transfer your data from the2 g. m, G9 T- ?" c3 X
- SQLite database to the MySQL database, we start with a clean and empty MySQL
2 v9 S" u) \# _( `( }/ V- D - database.. t% q) }$ H, p9 D% |
- Some users have reported ways to import a SQLite database into MySQL, but at
" L6 Z& ]: I) _8 T. R1 x - the time of writing, there are still too many issues - check the current status
3 K: {; ^" i- R6 j# O& R - in the TeamSpeak forums if you are interested.
2 o5 ?$ W+ {; Y4 F - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 ~2 x+ G: `" d* w( a
- Borland was used. This driver can only interface with the client library that + R _2 o4 J* y: Q# k% t
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 j: {; C* a! i Z7 V4 i
- client library - basically all you have to do is to use a 3.x client library as - G& |, \" W3 Y u0 L
- "VendorLib" and a 4.x database to connect to.( F/ u2 w, I/ q: [- O0 t. p
- If you need more info about dbExpress, you can contact Borland.
( O; i! A% f8 I) A+ @" c5 d
; j8 T- W# R# `5 m4 {1 x- ### Doing the work ###+ x" S2 ^% s; Y* S
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ }( X/ _3 Z6 n6 Q. K, L
- the perquisites right, just open your server.ini file, and add this section at" E; o0 w( y1 j! X; N2 z, F( h2 w
- the end:* I! ?. v j, v
- ---cut here---! g5 o% M7 h8 O0 h ~8 ~; T% C
- [DBEXPRESS]
. _# b3 U! E+ ?' b1 k% X. w8 r - sqldir=mysql_sql
9 v, Q% S" O7 k9 X0 l b - Drivername=mysql- ^) p8 X1 X+ \6 y8 L& Z0 ^
- Database=Your_Database_Name_Here% z- {; r& S8 z+ c2 E. ]; F
- Hostname=The_PC_the_MySQL-Server_is_on
* R" V6 L( N" S; z - User_name=User_name_on_the_MySQL-Server
& z6 Q8 h$ q: V7 u8 X7 X* [ - Password=Password_to_go_with_above_user_name
1 f. R; [5 E1 r - GetDriverFunc=getSQLDriverMYSQL
, L9 l, `0 x* n" s9 f. r- c - VendorLib=path_pointing_at_your_mysql_vendor_lib
) w2 h, h7 S& `% J) N - LibraryName=path_to_libsqlmy_libary
7 _% e. D8 i4 f) s( { - Active=1% ^; L/ e, y) G3 L- `4 F0 I) G
- ---cut here---
4 B! a+ ^2 M8 d- U% m* n, t$ Q0 J - In my environment (a linux box with a MySQL server running locally) I have:
0 r! X# X+ o4 }$ f# L+ ~+ _ - ---example---
; C6 w6 ^: K) J! g$ R: H - [DBEXPRESS]$ \: X6 n# W( H1 Q0 U
- sqldir=mysql_sql/ c) q6 ]+ k* ^" t
- Drivername=mysql" _* z7 y3 m- t [" f* A
- Database=test
1 _: @; A" E% X0 k7 b8 a0 B5 ^ - Hostname=localhost
: T- `5 M& ?- M3 N% @ - User_name=testuser
4 F/ t/ ~+ t9 S/ b - Password=my_password
" T4 v' R* E0 i. y+ Q* M. b - GetDriverFunc=getSQLDriverMYSQL q: ~' l/ ]2 s: P2 l
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- H7 E) _, Q" J( B - LibraryName=./libsqlmy.so) B, Z9 e6 M2 A# ?4 R
- Active=13 d( S1 G8 y" D8 s# C" G
- ---example---
6 H/ g) h# K' G& u0 _- z - " Q0 a1 {) J5 ^4 |: q* e
- On a windows box, also running the MySQL server locally, it would be:; V4 o8 O2 ?# j M" i
- ---example---
# {: [+ ?9 h1 ?8 y& @ - [DBEXPRESS]
: n8 s7 z; Z6 E5 P. @+ o2 | - sqldir=mysql_sql
, o4 j( o# H3 U" |" Z! s7 ` - Drivername=mysql' ?7 _9 \7 r- e3 Y! m! I( c
- Database=test- A% ^9 F, p, R3 m
- Hostname=127.0.0.1
& n- q( R) T2 i$ }# r7 E' a0 I% l - User_name=testuser
3 [& O2 [7 c8 E+ y# Y - Password=my_password4 b4 C$ y+ x5 _4 U: O0 U
- GetDriverFunc=getSQLDriverMYSQL
3 ^3 L6 C! Z$ j9 W) ?1 ~ - VendorLib=libmysql.dll
6 K% [$ H0 y. I - LibraryName=dbexpmysql.dll2 z, x& E, N+ a2 c [
- Active=1
/ I& s( q! E( V+ ] - ---example----
' Z2 O# ?4 ^5 }7 o% |! z - - written 02.03.04 by pwk.linuxfan
' O* L9 w! J9 u& u p+ L - ! g1 S2 H( w1 Q% Q+ N+ Y
复制代码 |
|