|
|
麻烦翻译一下,下面这段文章:xhan ( W! X' P4 A. q$ K# M( N
' V5 B+ t. K# @* k
- 2 X$ g* Y* H: C( u
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( @) s: K+ [( W7 X, A4 v
- ]( H [' j' b3 D3 |4 p, i1 G- ### What we need ###
' a6 H+ A+ K1 G$ | - Naturally, we will need a MySQL server to store the data for us, this document
# q, T" |. F! J7 l% [% [ - will not explain how this can be done - there are documents out there for the ! k6 g* Y/ n1 B/ P' i! V3 _ E% g
- interested. The requirements include a (empty) database for TeamSpeak to use
+ j( Q6 i" b( D0 Z: s9 O! g - and a user account (username + password) that has the permissions to do stuff
3 Y* s- a6 c1 b3 e - with the database. Additionally, you will need a vendor library installed on the' A8 m1 U; w7 H; v' e8 P- ~/ m, F
- local machine, this came with my MySQL install.0 b$ |7 q+ f' v0 d" j
- These instructions will not tell you how you might transfer your data from the% r4 t) _5 R0 @8 B- M
- SQLite database to the MySQL database, we start with a clean and empty MySQL* P6 M, n* h U, ?/ f
- database.
9 T) ], B( T! q3 u - Some users have reported ways to import a SQLite database into MySQL, but at7 Y9 z' l3 H9 Z. [: j% g
- the time of writing, there are still too many issues - check the current status" c/ u% v/ @2 X2 l7 i
- in the TeamSpeak forums if you are interested.( t0 o- `4 ^. q0 S r# e
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; r* w* P- m. J+ M+ Y/ {! Y' c9 x v
- Borland was used. This driver can only interface with the client library that
, \2 v* q% `) Q" u. N( c# V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 u+ K2 b9 E: w) C0 s( {1 q - client library - basically all you have to do is to use a 3.x client library as
$ ]* ^6 B( ^9 K$ s' b2 z# @: _/ t - "VendorLib" and a 4.x database to connect to.
. @2 N) S( |" |& g6 u5 p2 K1 y% v2 g - If you need more info about dbExpress, you can contact Borland., k" W- W6 m# ~& O: H# V
- . C+ y, s! T2 M' }( F
- ### Doing the work ###6 |8 |' p) U5 J' H+ o# g
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* ?5 K' ^* @1 n0 e- F' Z
- the perquisites right, just open your server.ini file, and add this section at
3 H- y! U0 a# @& |7 }8 w0 d - the end:
# \. p n# F* v# N1 k( w. s9 v _ - ---cut here---5 S6 X: H2 A% e5 T0 M3 n
- [DBEXPRESS]. S _ s) T! W7 d* j
- sqldir=mysql_sql3 D- w# C5 D$ T$ H% {
- Drivername=mysql
* ?0 V# S+ j- x, e3 h - Database=Your_Database_Name_Here( Q, L) e R+ S1 ]. T5 h
- Hostname=The_PC_the_MySQL-Server_is_on
1 ?( } \9 ^' E& s! R" n - User_name=User_name_on_the_MySQL-Server6 U/ e2 z8 o: S4 _
- Password=Password_to_go_with_above_user_name
; J1 u6 Q' l+ M4 Z - GetDriverFunc=getSQLDriverMYSQL
7 E' ]7 ~1 k& i8 |2 v; s( F3 q - VendorLib=path_pointing_at_your_mysql_vendor_lib4 l+ Q" ]; J; t6 t( f/ b. _- L2 Z
- LibraryName=path_to_libsqlmy_libary+ Y' o- j c+ g( h6 a
- Active=1
" v# _. Z& N5 L* \ - ---cut here---+ m, A& p4 `( c$ Y
- In my environment (a linux box with a MySQL server running locally) I have:9 N8 t' B' d9 _7 `- Y
- ---example---! S- ]. i0 m; d; O! f9 z* `
- [DBEXPRESS]. q* ?% }3 I) V9 h4 p9 F
- sqldir=mysql_sql
I9 k" y0 s& A, {6 P - Drivername=mysql) F- u, G# n" c" Q; @- R
- Database=test( D7 r4 {- c h, q9 g8 W
- Hostname=localhost
' J# A- z' e2 J4 @/ g - User_name=testuser
0 H0 l9 \/ G' Q# x( N - Password=my_password
1 ?& M' Q4 E a; z$ B - GetDriverFunc=getSQLDriverMYSQL0 v+ b) d5 t7 y9 s
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
9 \5 n2 a, J, }# C3 H$ j - LibraryName=./libsqlmy.so$ y) U" O* {- S" g0 i9 d
- Active=1; t& F8 U3 i$ p! Y0 ?! `
- ---example--- d/ ?9 a: m0 B6 o) J: {2 ]- l; n ]
- ! |# k% D) r' H# N
- On a windows box, also running the MySQL server locally, it would be:
+ t! ]; X7 J/ Q, r - ---example---
7 [: x+ M7 h' ^2 }. w: _ - [DBEXPRESS]: v) f* C& o) l l- L
- sqldir=mysql_sql
4 v6 \5 ~; `9 ]4 X2 { - Drivername=mysql
# ]0 l; a* S5 m. E0 p( a6 T - Database=test
8 z7 C2 i R& K) \ - Hostname=127.0.0.1
! o3 w9 n) ]8 F - User_name=testuser
$ h: e$ ~1 V: @3 a4 @ - Password=my_password6 x$ a6 W- c1 ~% W" h8 n
- GetDriverFunc=getSQLDriverMYSQL
; t p6 h* Y+ @: w6 U& v& M - VendorLib=libmysql.dll3 q. W& }, V7 `7 r
- LibraryName=dbexpmysql.dll
; `/ F$ R5 F5 i - Active=1
$ X- D% T) u7 V& O - ---example----) u- w* {* T8 P* b/ ^6 U/ v7 ~
- - written 02.03.04 by pwk.linuxfan0 C# L( V* ]. W$ v, X) G) n9 ~4 x+ j
- ; N3 z! l% g3 f" G! j! B; R4 J) C
复制代码 |
|