|
|
麻烦翻译一下,下面这段文章:xhan
' Y# n8 S+ v* N: w1 \" a3 j3 }7 {2 |) M( y+ I- l# U
- 4 G6 L1 v* P! x0 c0 W& K; V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( \" ] Y$ t P; I% q- p% W9 n
- 4 V; O! _* U; s6 k
- ### What we need ###
6 `. ^% j6 }* _8 e - Naturally, we will need a MySQL server to store the data for us, this document P( T( P, Q1 u5 J8 ]
- will not explain how this can be done - there are documents out there for the
8 Y4 u5 L7 ?, y' F Z - interested. The requirements include a (empty) database for TeamSpeak to use% G, b; m$ N+ k" g( T
- and a user account (username + password) that has the permissions to do stuff5 N/ t8 ?9 W! C9 D* a
- with the database. Additionally, you will need a vendor library installed on the
& }1 c R4 E+ D1 s) t9 V - local machine, this came with my MySQL install.! r% N4 T, w( P4 h
- These instructions will not tell you how you might transfer your data from the- g& O% U* H$ _
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 |# r; S! V' i1 Z+ x' T
- database.
2 G$ i9 q0 p' \3 r3 _0 ^ - Some users have reported ways to import a SQLite database into MySQL, but at
4 L0 v0 j& f Q% x# B' c - the time of writing, there are still too many issues - check the current status
: P4 e( k& p2 w5 L, h, E - in the TeamSpeak forums if you are interested.
- ~1 e+ b }6 Q* W - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( ^0 q+ b2 m i# W+ V - Borland was used. This driver can only interface with the client library that
4 ]% ?5 e7 j' p/ q - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this* W& \: f) e4 ?8 D! u; W* Q% f3 g
- client library - basically all you have to do is to use a 3.x client library as S& t0 _# O/ z' i7 y( W% B1 L
- "VendorLib" and a 4.x database to connect to.& C8 R p! J; L; n
- If you need more info about dbExpress, you can contact Borland.( b) _% p* |) F8 c4 I6 m
- : Z* D. }5 m, P- h- E
- ### Doing the work ###1 }9 D* k% f! W! f- f
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
* H3 G4 a! g5 T: T$ s5 W6 d$ t& Y - the perquisites right, just open your server.ini file, and add this section at0 d9 S9 v* y) [( m; k( s: H
- the end:1 F! r- s8 {3 v) Y& O
- ---cut here---8 K) J6 L0 B+ m
- [DBEXPRESS]
1 T: F5 Y1 o( K - sqldir=mysql_sql" y: s R& ?" A' W6 x7 U
- Drivername=mysql
' p0 u3 I* t- j0 V$ { - Database=Your_Database_Name_Here+ H$ x* |( {7 k2 s8 e* d/ L
- Hostname=The_PC_the_MySQL-Server_is_on" \( S# R! Y7 h( L+ T
- User_name=User_name_on_the_MySQL-Server
0 v/ ]' s- w, w4 x" {, ]4 A: d - Password=Password_to_go_with_above_user_name( F" i3 y4 \& ?
- GetDriverFunc=getSQLDriverMYSQL3 V, E2 T* n! U7 N. \
- VendorLib=path_pointing_at_your_mysql_vendor_lib
) G+ v& V9 B3 i$ n - LibraryName=path_to_libsqlmy_libary
% Y4 h) r: A/ E- F" t - Active=10 j. ?$ f9 w: d0 ^( s- S
- ---cut here---; }. ]0 n' g6 F" A4 \2 n, C% Y
- In my environment (a linux box with a MySQL server running locally) I have:5 x( N( ]$ b7 y1 D/ l i% @$ \4 B
- ---example---, T& Y5 }* I( N! g
- [DBEXPRESS]1 w1 v. ]1 Z) L* d; G& u
- sqldir=mysql_sql
2 w" U% p- P6 P* L - Drivername=mysql
9 N g/ h$ ^0 \+ t - Database=test
9 I. ^" [& |: U# |* ]: ^+ ~ - Hostname=localhost2 P4 d9 l" d1 C6 B. S, F
- User_name=testuser
! a6 K* W1 p- `: D+ _ - Password=my_password
; L5 [9 @8 X g/ q" O3 S2 Y1 o - GetDriverFunc=getSQLDriverMYSQL
) L% _/ Z) i" g9 L% |+ e+ n. p; Z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.06 ]( {, J8 r; e$ Q" }8 }
- LibraryName=./libsqlmy.so. H4 M9 b% Y7 t) h! Z$ P6 n
- Active=1
# J7 ?0 q9 o; n1 ~ - ---example---3 C# r3 R) m! b+ y
- * A* \9 K4 N8 G+ T1 a4 I, e
- On a windows box, also running the MySQL server locally, it would be:
3 p2 C6 E8 i# W9 z - ---example---& U& O$ E5 N6 T: J" x
- [DBEXPRESS]. h0 ^7 n4 A1 W# q6 f" ?) d; F
- sqldir=mysql_sql
1 T6 t9 B9 f8 N0 Z, e - Drivername=mysql
) D, {0 A; V3 K - Database=test! X* {4 [: G0 v6 m
- Hostname=127.0.0.1; Z2 g2 i" ]3 D- A( _6 {( Y
- User_name=testuser
+ A+ D5 y* a1 w3 ]. z - Password=my_password
6 g q6 {" k! V% u: H8 W& |' u - GetDriverFunc=getSQLDriverMYSQL
) T5 Z# x( A2 s: p - VendorLib=libmysql.dll
& \* t8 C1 o/ v0 i - LibraryName=dbexpmysql.dll- L$ f1 J- v q) o
- Active=1
6 I. l, \- X( x6 `1 \$ }% @ i - ---example----7 Q: E Y- Z6 K E1 \1 r! g* c
- - written 02.03.04 by pwk.linuxfan
! M7 }* ]! D3 C; | - ; `3 R! {# L. N( @' d5 Q
复制代码 |
|