|
|
麻烦翻译一下,下面这段文章:xhan " p3 Q7 @+ h, n2 U h
$ @" S m6 m( E$ N-
2 Y$ O0 T4 K$ ]2 j, U- J1 _ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* |* q; z! Q8 h+ @5 e/ c: t# C - 8 Y& m# C5 q" l! Y4 b! q
- ### What we need ###
' T4 v; [% K8 t6 H) M; P, U - Naturally, we will need a MySQL server to store the data for us, this document , i7 `5 T* s2 B8 h
- will not explain how this can be done - there are documents out there for the 4 p r: r- p7 Z# [3 H$ |' K
- interested. The requirements include a (empty) database for TeamSpeak to use
2 _' @; Q4 b6 v - and a user account (username + password) that has the permissions to do stuff
k w D; p% v, C. `7 ` - with the database. Additionally, you will need a vendor library installed on the3 {! B* _$ G4 [) Q- p
- local machine, this came with my MySQL install.
1 T' z$ D% q7 y8 n& h# Z - These instructions will not tell you how you might transfer your data from the
6 g" t" b( A+ @ - SQLite database to the MySQL database, we start with a clean and empty MySQL; `7 T& Z3 Z5 Z0 v
- database.
: ~/ z: B4 r, d$ s3 [ - Some users have reported ways to import a SQLite database into MySQL, but at
, L! m& [# K1 M- I7 M1 I( i$ Q - the time of writing, there are still too many issues - check the current status- B4 s; ?& b4 D, n, r
- in the TeamSpeak forums if you are interested.1 D- Y6 ^$ y9 p q. }
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 J3 N1 q: Q7 m/ M
- Borland was used. This driver can only interface with the client library that . I I8 }+ ?/ p- y, H
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 O& W& k0 }. F: K5 H4 E$ T
- client library - basically all you have to do is to use a 3.x client library as
+ s& D1 V: ~* } o - "VendorLib" and a 4.x database to connect to.
P$ c9 t; I1 {/ L3 V2 V g' ? - If you need more info about dbExpress, you can contact Borland.
9 Z$ b, I) I( b* }; p* D, { - & y5 e8 r; x& `
- ### Doing the work ###5 C/ t6 `% A+ ^: [; W |: Z
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
x" ?! n- t6 `& Y8 ~ - the perquisites right, just open your server.ini file, and add this section at4 h$ }9 B6 @* V- C' ~
- the end:
3 d; e! P( ?# w7 T5 s - ---cut here---5 k& h$ ^' m/ \* ^$ h2 y
- [DBEXPRESS]
" C" h3 t1 k: i. `; k: y - sqldir=mysql_sql
1 A, D3 W" X1 a/ T8 |! U - Drivername=mysql F# ?3 w) H6 B0 Z
- Database=Your_Database_Name_Here0 ?; ^+ a$ Z0 P$ B
- Hostname=The_PC_the_MySQL-Server_is_on$ U4 y; y2 v4 |! m4 O+ r* a( S
- User_name=User_name_on_the_MySQL-Server
* r4 p, m4 u% M: u( p7 Q - Password=Password_to_go_with_above_user_name" @. t! }) x& V
- GetDriverFunc=getSQLDriverMYSQL
3 a8 X, l6 U0 W - VendorLib=path_pointing_at_your_mysql_vendor_lib7 p* v. C) }9 @7 e- p
- LibraryName=path_to_libsqlmy_libary
# |; f; g1 a% [. W2 | - Active=1
: z/ v5 }# Y! F& o5 z - ---cut here---
1 \2 b- _( ]7 e# x6 \3 R2 U - In my environment (a linux box with a MySQL server running locally) I have:
0 I6 r: |5 [" ]' v, b& \% L - ---example---
. k# Y# @+ s3 p5 V4 u; ^ - [DBEXPRESS]
9 a. c, Y2 B+ |! n, { - sqldir=mysql_sql
. r3 V: R5 i3 w) m4 x - Drivername=mysql f/ d4 [* g/ I' F
- Database=test
( ?* m6 \5 \" J( A: f. c3 @" F - Hostname=localhost' U0 Z& W( Z' d" i3 p7 n
- User_name=testuser- \5 l& K( R- L2 i
- Password=my_password' U( K+ e! T G! v
- GetDriverFunc=getSQLDriverMYSQL
0 ]( e6 D, b0 W! J4 @' t - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 ?3 A g( W) Y- r - LibraryName=./libsqlmy.so
, \- ?# X2 ?5 V - Active=1
+ c1 ^; U, Y7 `, v' y7 J - ---example---5 j( u$ P, T' Q
4 x! G _4 x) I7 W% K+ T+ A- On a windows box, also running the MySQL server locally, it would be:
, p5 d0 e# f0 @& x7 d2 Z0 h, n - ---example---
) s! u" O3 q1 D) h' i/ T/ } - [DBEXPRESS]
0 }9 a) {7 Y3 t$ P4 k* k - sqldir=mysql_sql) N( P9 h: m4 i" b8 l
- Drivername=mysql: m6 X2 d4 @; w/ v& G! t: s' V
- Database=test. H- h( k9 G( T! U# O1 d7 L
- Hostname=127.0.0.1+ _ L2 ~0 H( j: G: k
- User_name=testuser
6 n- N4 ?6 c$ L! a1 g* m) X$ V5 g - Password=my_password- D! D r( h: D# Y. }+ K
- GetDriverFunc=getSQLDriverMYSQL
) U' L" K8 Q2 Z, ~3 p - VendorLib=libmysql.dll# T% G4 ?2 Y$ O, _! C; T# K
- LibraryName=dbexpmysql.dll# X/ n |* H; p+ f3 {$ G# R% B6 K
- Active=1; T) n# i) P; b% A
- ---example----) g2 ~5 ~8 j9 @+ w
- - written 02.03.04 by pwk.linuxfan2 G+ w$ g, s# k3 ^ G9 c
0 O( q- s1 C' ~ `4 ~
复制代码 |
|