|
|
麻烦翻译一下,下面这段文章:xhan
/ k* W4 Q& R7 @) l( {3 U4 S) c E- v2 N3 d. I2 w$ K. g- W# v
-
+ |& B8 A. Q8 G9 k/ t! J2 r- ?/ a - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 K( G* b3 X0 \' w: `
- 2 Z. h+ f0 X" g; V( r% S+ |2 O
- ### What we need ###
3 T2 o8 a: V, G( q4 X& F - Naturally, we will need a MySQL server to store the data for us, this document
# Q7 {% Z7 p: K# O6 u# r2 J3 r - will not explain how this can be done - there are documents out there for the ! g, `5 f1 M7 B
- interested. The requirements include a (empty) database for TeamSpeak to use
/ x( @& E) a& a2 c - and a user account (username + password) that has the permissions to do stuff' i5 m& \0 G/ P( E2 J. u: `
- with the database. Additionally, you will need a vendor library installed on the
4 o8 H& T4 W- O/ a+ N5 ?" U$ p* x - local machine, this came with my MySQL install.
! z/ I, u8 E, U; N" y - These instructions will not tell you how you might transfer your data from the* \% t- T: F% D. G+ u R
- SQLite database to the MySQL database, we start with a clean and empty MySQL7 b& M6 i* P0 H/ w
- database.
& _2 H; Q. e7 z7 f' g7 c - Some users have reported ways to import a SQLite database into MySQL, but at- |5 t$ W; G' b8 _- Y
- the time of writing, there are still too many issues - check the current status* S! O B" L8 M+ Z+ P
- in the TeamSpeak forums if you are interested.
1 d3 N- T6 f/ o6 A- a1 Q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 @+ |8 H$ @2 ^- G" i( y6 V
- Borland was used. This driver can only interface with the client library that
# C5 P0 g8 E6 M t/ h - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. s2 Q1 m5 ^) W2 x/ W: X, }! u5 Q - client library - basically all you have to do is to use a 3.x client library as
5 q- I n6 B8 o% F$ N& | - "VendorLib" and a 4.x database to connect to.
P' a! @7 F% _3 {% W - If you need more info about dbExpress, you can contact Borland. {; u1 g" O) c
3 x( g2 U& B$ P8 L2 M/ @; \- ### Doing the work ###8 A, x% R9 A' {9 V( C) x
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all' \0 g3 y, c8 c' H
- the perquisites right, just open your server.ini file, and add this section at0 v- v, h) J$ k/ L( R* |2 p; N
- the end:0 I6 R" R& u: ~+ S% X* u
- ---cut here---
# A( Z+ J9 j$ S' v4 m: F; v& F! S( ` - [DBEXPRESS]1 G3 A. g6 m0 I. W; r, [
- sqldir=mysql_sql
6 X) o8 Q9 U0 \$ { - Drivername=mysql
; y6 M A# X7 l+ l - Database=Your_Database_Name_Here: K& o' l9 b6 ~9 b: l$ L9 O3 t
- Hostname=The_PC_the_MySQL-Server_is_on p2 Q, |) F3 j# h) b, u# ]
- User_name=User_name_on_the_MySQL-Server
3 R" P' z* Z. B$ y - Password=Password_to_go_with_above_user_name
3 X) }# U e- N* j7 H/ B; N - GetDriverFunc=getSQLDriverMYSQL7 r: g+ W, y3 s( a b
- VendorLib=path_pointing_at_your_mysql_vendor_lib |2 t+ {" T3 G5 ^, c ?& ]* x
- LibraryName=path_to_libsqlmy_libary
5 s) m5 D; e4 ]/ g+ E - Active=12 |$ u1 M0 m1 x$ q$ z- @
- ---cut here---
9 D6 ]3 e* ^9 c' k - In my environment (a linux box with a MySQL server running locally) I have:
3 ^% k5 }0 c0 J8 V0 | - ---example---
$ c% u T, X5 k' G P - [DBEXPRESS] F% j8 X8 h4 }+ p$ z, W8 @1 H' [
- sqldir=mysql_sql
: ^$ w+ N+ u3 W+ | - Drivername=mysql) ]5 x e% A; f) V* @/ u
- Database=test5 R* R. p) h- d. M r
- Hostname=localhost
. c4 v* D$ ^! _6 h6 l% c - User_name=testuser
4 |0 _% L# Y/ J; n/ q- G5 t3 f - Password=my_password
; q, X; [4 f# O _& X/ O2 X+ v - GetDriverFunc=getSQLDriverMYSQL
6 O- e0 Q$ a) X+ r - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.05 ^+ x1 x Z* u- d2 Z& X
- LibraryName=./libsqlmy.so& U+ Q b- z" i
- Active=1% g* P- E' h5 y2 e! `
- ---example---
z# J6 A% j* f8 c4 e - / L9 m0 Y4 ?5 \$ |
- On a windows box, also running the MySQL server locally, it would be:
: q* K5 o6 o5 v) y - ---example---! @9 ]: a& _! y
- [DBEXPRESS]* Y& \( g* f# D
- sqldir=mysql_sql
. s$ }* f) M4 v3 l2 E( Z - Drivername=mysql
% g5 i# Y$ n& ^$ `, W- |. o- V - Database=test% ~0 O7 h* m1 `& q
- Hostname=127.0.0.1# c. I( W, `& p K3 l! g8 S
- User_name=testuser
3 [" C" _: @+ o- t: U* u - Password=my_password
) {* O) _; ~5 G - GetDriverFunc=getSQLDriverMYSQL
' T4 _6 R: t. j0 k - VendorLib=libmysql.dll
$ y1 M4 o- n1 `7 J - LibraryName=dbexpmysql.dll
- g0 j2 E6 P$ V- z. ^ - Active=1
8 y0 g g* I) N8 S2 E - ---example----& E, ]( K/ J6 p, T# J) [
- - written 02.03.04 by pwk.linuxfan4 p! f" B1 W" R* R* F" N* _
- % z0 ~" m3 P: V6 l7 G
复制代码 |
|