|
|
麻烦翻译一下,下面这段文章:xhan
# R% b" c. K; Y" k$ `
* R) W+ D9 R# S) r) _* P- + k& b3 e: b: z& ~1 X. j' t
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; M7 r( ~: }. u6 S. u
2 a+ x. m i6 R, I q9 T! f+ ?- ### What we need ###2 y+ u, e2 ?4 q8 r
- Naturally, we will need a MySQL server to store the data for us, this document * P$ S8 [- p8 O- i/ o; t
- will not explain how this can be done - there are documents out there for the
3 a3 c9 t9 g6 i3 W# c8 I - interested. The requirements include a (empty) database for TeamSpeak to use* ^( f$ j4 |3 s. [' p
- and a user account (username + password) that has the permissions to do stuff0 h2 [# `5 l( W# \1 E5 O
- with the database. Additionally, you will need a vendor library installed on the5 H( _+ I9 ^ ^7 ~! ?4 ?: k( H
- local machine, this came with my MySQL install.2 P ^1 b+ h; f' {% Y
- These instructions will not tell you how you might transfer your data from the
/ t& D3 } u8 O3 o6 ?/ b7 u - SQLite database to the MySQL database, we start with a clean and empty MySQL
6 D7 f& r# C! Q- i - database.# z" @7 ~; J1 `2 q2 t" q
- Some users have reported ways to import a SQLite database into MySQL, but at
% G- U" ^. d) Y, [! u - the time of writing, there are still too many issues - check the current status+ m+ B+ S, n! O& T- q9 A* I
- in the TeamSpeak forums if you are interested.
' m8 s2 P, N. ^$ d# R - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) y ~0 L0 {* C W) I# u - Borland was used. This driver can only interface with the client library that
9 s" {% j1 }0 }0 n - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; C5 [( P1 ^& D' b - client library - basically all you have to do is to use a 3.x client library as
( y9 ~7 }0 Z( v0 U" g - "VendorLib" and a 4.x database to connect to.
/ C5 E! ^5 z- `- g" `( @" L - If you need more info about dbExpress, you can contact Borland.; q! M7 N& R P0 D5 s
# A+ S5 }* c3 @* @9 y5 O) I- ### Doing the work ###
# l8 Q! y0 c$ e5 u9 c8 g( d3 @ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
/ K7 `* j4 `1 Q5 l4 U - the perquisites right, just open your server.ini file, and add this section at8 E) u9 X4 p8 M& `3 f$ S4 [
- the end:
6 m7 d2 W; ?6 K - ---cut here---
; a" |, b( N4 w# B - [DBEXPRESS]% a- X" j% l0 ]9 ?1 {- c5 I
- sqldir=mysql_sql; A" a8 z6 I8 x- }: k
- Drivername=mysql4 L9 v# {( U3 Q# V
- Database=Your_Database_Name_Here
5 u3 r$ Q. W( f D" b# R - Hostname=The_PC_the_MySQL-Server_is_on
, _: u! c6 }* t, v2 x - User_name=User_name_on_the_MySQL-Server
+ ~5 d% Y8 M- Y4 g- p - Password=Password_to_go_with_above_user_name
& E5 J# ?& }) u5 i5 U. k. r( A - GetDriverFunc=getSQLDriverMYSQL
$ D) k1 c9 K+ C6 V - VendorLib=path_pointing_at_your_mysql_vendor_lib8 W" ?1 ~+ m8 \* i) Z+ W$ g4 E
- LibraryName=path_to_libsqlmy_libary# W( a' f6 w+ Q$ w2 b( i$ [
- Active=1: S" r4 Q1 m! z1 D$ \; }0 O- M
- ---cut here---
. J* Y* z0 v" N# y+ l4 N - In my environment (a linux box with a MySQL server running locally) I have:* |& R6 n) o0 S" X3 j4 Z4 A3 M
- ---example---0 V { g' K7 G# W
- [DBEXPRESS]$ c% @& Y: N7 G+ K$ Y
- sqldir=mysql_sql
7 j, \; ~" f: O( ]3 W; H( P - Drivername=mysql
3 A. Q: u7 W, x* E1 B - Database=test8 }" K7 O' a' r5 `
- Hostname=localhost
9 R' t3 @2 \. Z2 Q5 ?0 a - User_name=testuser% n+ s$ {2 R- R x. D
- Password=my_password, u9 Q$ y7 L- K" e4 s; l4 h
- GetDriverFunc=getSQLDriverMYSQL2 X# W' n. M% h' X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( s c9 U; d* ~8 Q
- LibraryName=./libsqlmy.so
' E7 y8 f6 Z6 W# u/ h( ^9 ^' \ - Active=1
( ?" j: P6 C; { W - ---example---5 @' `# G5 N3 y& y# Z" i
% Q6 W H. `$ V3 s- On a windows box, also running the MySQL server locally, it would be:! u/ x& F: E9 w* R3 B, q; K7 I
- ---example---
2 Z T% }) S: z& ^2 y - [DBEXPRESS]: T$ J5 D# B' N
- sqldir=mysql_sql
s# s Z9 d7 X2 S9 B. \ - Drivername=mysql
; Y8 `$ {, R% z* K$ F6 ^+ p# n - Database=test. X$ q1 l. t/ N- X G* D
- Hostname=127.0.0.14 x# |1 Q2 X- g& z8 u- {2 Y. K
- User_name=testuser. s2 ~# N5 s9 L$ x
- Password=my_password
1 R |+ [8 M( Q9 {2 @$ \ - GetDriverFunc=getSQLDriverMYSQL. U3 c( T- ^4 d, K4 y1 ?3 Y4 g7 i
- VendorLib=libmysql.dll; F* U+ }0 {% L0 l
- LibraryName=dbexpmysql.dll
5 j" e, U% q! ^: E/ d2 G - Active=1. V8 w2 M3 W7 d' Q: P4 D* \( o
- ---example----
6 D; O! V5 y: I F - - written 02.03.04 by pwk.linuxfan
- H& m% {1 k+ `
8 E$ u% V2 t# E- D& v
复制代码 |
|