|
|
麻烦翻译一下,下面这段文章:xhan
1 l, O) o1 W, `; K; ]; l' e1 E% E" i/ p0 ^9 U7 L* R
- % k. b$ H# \$ K. t8 }' d& j$ d8 V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: T, O0 j& y# H8 V
- & s/ T# J# b3 y7 p# }) [
- ### What we need ###/ A2 _! K6 A2 h; m5 W
- Naturally, we will need a MySQL server to store the data for us, this document 0 c4 M7 {3 Q. T) g/ K) d' ~
- will not explain how this can be done - there are documents out there for the
% M s. o! d, a8 G: C; n - interested. The requirements include a (empty) database for TeamSpeak to use1 X7 D' Z5 k. j
- and a user account (username + password) that has the permissions to do stuff5 f1 M+ C9 r! f8 B, f# ], h( R$ m
- with the database. Additionally, you will need a vendor library installed on the
, ~2 s' }6 B* d/ |) x9 x# P8 W) a' ^ - local machine, this came with my MySQL install.
. O4 f x4 _5 @ - These instructions will not tell you how you might transfer your data from the
) q" O. X2 c1 p+ x+ |5 m - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 g$ e' o( c$ \( H) X! x - database.1 m- G9 G: W8 g) a! i
- Some users have reported ways to import a SQLite database into MySQL, but at4 M) s* H" {) X6 E! m. I
- the time of writing, there are still too many issues - check the current status
- u$ j- Z5 b; ? - in the TeamSpeak forums if you are interested.6 q) ^& c& h, k) h. A
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* H1 l) @: `& t1 l
- Borland was used. This driver can only interface with the client library that ' z: n1 x# A) |5 _8 P+ m
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- |9 x9 ?2 I" q9 k2 u! h
- client library - basically all you have to do is to use a 3.x client library as
; {* X/ D, l5 f# f0 u - "VendorLib" and a 4.x database to connect to.
( u9 L3 i: g# z4 x/ l9 R - If you need more info about dbExpress, you can contact Borland.8 b/ h6 `. D' x+ e+ x
- : D# ^/ {6 m. i4 K& v
- ### Doing the work ###
* A r+ {: k4 c) o$ t; T4 X) c# @ _3 n - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ P6 D. \/ J: _5 q- E8 ^* b% x - the perquisites right, just open your server.ini file, and add this section at
7 \' O( h4 I% k" ~ - the end:& o+ G c( {! ?: B
- ---cut here---) C# f/ }$ }) U+ Z( D
- [DBEXPRESS]$ s' D$ w* z$ k$ A+ ?( R
- sqldir=mysql_sql
) l6 j! O9 o! ^+ W: J$ M - Drivername=mysql
5 W/ D/ w! s/ a - Database=Your_Database_Name_Here
0 r: u1 o# w( v# g5 v - Hostname=The_PC_the_MySQL-Server_is_on
1 @, G: W0 w! O3 \ - User_name=User_name_on_the_MySQL-Server( k7 g& k/ `5 J5 p& v& R
- Password=Password_to_go_with_above_user_name/ ^; U. x0 ^1 ]0 p9 {
- GetDriverFunc=getSQLDriverMYSQL2 I' x' D6 c1 i; v# p: J- A0 F# P
- VendorLib=path_pointing_at_your_mysql_vendor_lib) T, b4 T) a$ D0 P0 e
- LibraryName=path_to_libsqlmy_libary, x+ ?7 @! [% b/ X' {
- Active=1
. A/ H$ E# c- n - ---cut here---: ~) e% P% }* W+ o# O
- In my environment (a linux box with a MySQL server running locally) I have:& x9 M0 f' C/ D
- ---example---3 J0 S4 O1 \; e D) l7 g" R2 s
- [DBEXPRESS]
4 R' w/ }0 U7 W( B - sqldir=mysql_sql+ B% N' @% z8 \, _4 Y9 [
- Drivername=mysql ]6 v* `+ P; s; j* d
- Database=test: J4 V( S, b( J9 H" q$ |
- Hostname=localhost
/ X# g) J! P4 y2 w - User_name=testuser
2 y5 M k9 A# f/ a7 u( M. D. Z. K - Password=my_password
+ y! @" R% [% M1 Z5 g' S; ] - GetDriverFunc=getSQLDriverMYSQL
, V$ }( y6 j) Q+ a! i$ X/ I - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* G. r/ l, x. P
- LibraryName=./libsqlmy.so% y' B4 b3 }- z1 f7 N: H+ A
- Active=1
* p6 Z$ g. G* c* a5 ^ - ---example---
, O8 }! q6 j# U4 M2 p
: L: ~" S3 [& C2 q" Y; [3 m4 i/ X- On a windows box, also running the MySQL server locally, it would be:, S: t: v2 b7 E* F! m. N
- ---example---
4 n: Y0 R& s# h - [DBEXPRESS]/ }, j. m9 z/ ~
- sqldir=mysql_sql
+ h2 f4 i1 k: D- c - Drivername=mysql# o: [3 R) Q% M _$ E+ t
- Database=test9 ]; G0 t5 `9 d$ V% a
- Hostname=127.0.0.1
# [! ?1 O, p8 E& q* M) ]3 [ - User_name=testuser
/ G/ }) C Y5 k5 J6 O - Password=my_password
; B4 y3 ~: {0 F$ G; `- K" ^4 V- F - GetDriverFunc=getSQLDriverMYSQL
) g7 {" ?* w: ], T0 g - VendorLib=libmysql.dll% j, P3 E6 I' j
- LibraryName=dbexpmysql.dll
, A5 s& B( S* f& O3 F - Active=1
1 j0 {$ A2 x. T. E1 h - ---example----7 ]. R/ h# H* ~4 v
- - written 02.03.04 by pwk.linuxfan# q7 @( u7 s* A- r. Q( |( v# K
- 5 m; Q j3 F! ^4 p
复制代码 |
|