|
|
麻烦翻译一下,下面这段文章:xhan ( G0 J& x% o2 p& P3 [3 b- [! P# q
: p7 V7 e: `' |8 S- " g# x$ w, Q `6 J% Z/ G
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 y) {+ P) S# N
, j" F( ?, h$ K7 s% k" x: m- ### What we need ###
% w/ ?( j; Z" h2 @! E - Naturally, we will need a MySQL server to store the data for us, this document
# f3 N U" g* K+ Z - will not explain how this can be done - there are documents out there for the ' v/ A* Q, w. P
- interested. The requirements include a (empty) database for TeamSpeak to use
; a, |) J' k6 D2 \/ c- D: j - and a user account (username + password) that has the permissions to do stuff
" N6 Z0 _8 c& D8 @: ` - with the database. Additionally, you will need a vendor library installed on the
0 o8 S1 { r N - local machine, this came with my MySQL install.
5 ^9 i: @* K( l0 k' F0 y - These instructions will not tell you how you might transfer your data from the. B1 `$ n. _! X Z9 u8 A- m
- SQLite database to the MySQL database, we start with a clean and empty MySQL% S9 M7 V% N3 k* h2 b A5 V7 ~' @3 L
- database.
0 |$ ?$ x* N8 D# e A7 W$ ? - Some users have reported ways to import a SQLite database into MySQL, but at
, A& {6 W% j1 P* z9 d5 x3 j - the time of writing, there are still too many issues - check the current status
7 |7 ?- y" d$ x/ y; U - in the TeamSpeak forums if you are interested.
& V* o( `; X4 C - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# v. b8 v; D# e" x
- Borland was used. This driver can only interface with the client library that 5 n) n8 w" \1 b/ \+ H3 \
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
2 ?9 ?* l7 U1 y$ F3 { - client library - basically all you have to do is to use a 3.x client library as
/ f: o5 Y X" m# M' _1 x6 B- \ - "VendorLib" and a 4.x database to connect to.7 J0 r( Y2 Y4 J5 K* O
- If you need more info about dbExpress, you can contact Borland.
2 N3 R, u! G: B0 |3 c - . l0 p* ~" X$ z+ Z p* b _% F
- ### Doing the work ###9 [. I1 ^: ^" o( H- c6 U& ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ O' f) i" g& t$ N
- the perquisites right, just open your server.ini file, and add this section at
2 ~3 E( B1 T7 G3 T# E; E, I8 N - the end:
+ f) a1 Z2 n$ V7 D+ S. B - ---cut here---+ l, r! D. X* q: N( ?
- [DBEXPRESS]' G6 o3 v Z' h$ b5 a6 k
- sqldir=mysql_sql
$ M. F; A3 c! y2 G. n - Drivername=mysql
! l* f( F, h' Z& J - Database=Your_Database_Name_Here! e) f3 A( p: H! _. l1 P
- Hostname=The_PC_the_MySQL-Server_is_on
& T5 \& W: k5 r0 _0 S5 h8 ?( l2 X - User_name=User_name_on_the_MySQL-Server
) ?% {/ g# z' G/ Q - Password=Password_to_go_with_above_user_name
! ^: U( b9 w2 `9 o; R - GetDriverFunc=getSQLDriverMYSQL
+ y) {+ z' H3 f. @6 H/ c9 [: G - VendorLib=path_pointing_at_your_mysql_vendor_lib7 u+ c3 m9 E/ E- K
- LibraryName=path_to_libsqlmy_libary
, l8 m% ~& |# I; L7 ?8 N7 e - Active=1' y+ r3 {6 q# | |3 B( t& T$ o
- ---cut here---+ M# I7 l1 ~# v' Z& w9 s
- In my environment (a linux box with a MySQL server running locally) I have:
" ^9 u$ `2 E& |+ f5 V - ---example---
. n/ ~) p( B: H# W7 C - [DBEXPRESS]
! C) Q- E! U5 k - sqldir=mysql_sql
; R# g. B* {2 n* p N - Drivername=mysql
- W( H% |. e8 G: O - Database=test
; t6 K5 ~9 U4 C& u8 m" S - Hostname=localhost, X( a& Y3 ^# B: `3 y
- User_name=testuser
2 m1 H: `5 k) q/ V! @& { - Password=my_password
! w& ^9 d w# `) O - GetDriverFunc=getSQLDriverMYSQL. ], o! D( b) }( |: F: R6 M
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; e; l' N: N! s+ j9 y) F: k
- LibraryName=./libsqlmy.so
3 Z% B" V H2 {5 A0 ` - Active=14 S% C, [" Y4 P! O' k: \' |# A3 A
- ---example---
7 O, r9 W* C6 e8 o, X+ H, Y) \ - - D; s5 ?, J" z# f
- On a windows box, also running the MySQL server locally, it would be:& L9 v8 D# s1 [! W* ]
- ---example---
, o5 [2 F# [. y# N5 j9 c - [DBEXPRESS]$ L! A# J8 |3 {6 l: N! p4 W9 _2 k
- sqldir=mysql_sql' L/ v% Q1 X" U0 R9 x( {: S
- Drivername=mysql9 T9 _; X4 }/ L
- Database=test# |, }( r. M- L" |( V: n% X9 I0 X
- Hostname=127.0.0.1
' i8 _! Q& _9 C1 M" Q - User_name=testuser
: X% }& q D6 i: a - Password=my_password- _( f1 B. j! Z6 p
- GetDriverFunc=getSQLDriverMYSQL& Z5 F) s5 G x/ X
- VendorLib=libmysql.dll
( W* R/ Y- }* N$ M - LibraryName=dbexpmysql.dll
$ m% E5 ]" v) Z1 D# i U - Active=1' \' [( v9 U2 j8 j; c7 W! |
- ---example----, j5 N3 I- s+ [) g: R
- - written 02.03.04 by pwk.linuxfan
1 i4 O* G9 _$ \& a% ]6 y - : Q' p+ C' B3 B: z
复制代码 |
|