|
|
麻烦翻译一下,下面这段文章:xhan # G& T3 m' h$ Y
0 P$ U7 q2 m6 l" D- # o9 G% x2 [8 V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 X! e8 o3 }4 t+ m4 s" l- N
- 0 s$ ?) {0 t5 T
- ### What we need ###
9 M& R) Z; _+ ^9 G6 W: Q6 l3 E - Naturally, we will need a MySQL server to store the data for us, this document * v8 A8 P0 S' z% v2 \0 e& v
- will not explain how this can be done - there are documents out there for the 1 W$ x% u, {# k$ m/ l0 I- F
- interested. The requirements include a (empty) database for TeamSpeak to use
\7 m5 j* @" V" f - and a user account (username + password) that has the permissions to do stuff8 _- [1 |: o* L7 \# b5 c
- with the database. Additionally, you will need a vendor library installed on the# z2 g/ p/ g2 p7 ?$ Q
- local machine, this came with my MySQL install.8 ~+ C& p7 @3 y1 o6 c
- These instructions will not tell you how you might transfer your data from the
0 H3 z; |$ K4 x3 c - SQLite database to the MySQL database, we start with a clean and empty MySQL* |% X1 u; s' Q% P* r) q
- database.
- _; m9 m0 @, S/ c - Some users have reported ways to import a SQLite database into MySQL, but at
L0 ^2 @1 b e* g - the time of writing, there are still too many issues - check the current status
8 r7 p8 m0 e0 \: ? - in the TeamSpeak forums if you are interested.
1 n0 P. ~ h1 K/ T$ s - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 a- {( f. C! [* J4 t( { \& h
- Borland was used. This driver can only interface with the client library that
7 C, ]' S- ]* f0 h - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
0 C; t" y% U" d" O- S( c - client library - basically all you have to do is to use a 3.x client library as + \2 @) T% i5 x. R
- "VendorLib" and a 4.x database to connect to.
6 q' v8 N8 L, v7 z+ K, P# I - If you need more info about dbExpress, you can contact Borland.7 ?' s4 R6 r/ P
- 9 i1 ?% u' ^6 ~- G7 |9 p/ v
- ### Doing the work ###' I. ^6 b H9 J! s
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
/ R5 b. {: x; ]' j: x9 g - the perquisites right, just open your server.ini file, and add this section at' b: A1 P- z7 {+ w; R4 I
- the end:
# [% d9 t, c/ H" {3 ~/ e - ---cut here---
6 P& E% W. I4 R3 \ - [DBEXPRESS]+ m, R! q5 {" t$ N+ Y4 H3 h
- sqldir=mysql_sql* n6 E: H. `$ O- @3 m
- Drivername=mysql
9 Q; o6 f) e* i - Database=Your_Database_Name_Here
3 H* Z" ~6 d# b2 t - Hostname=The_PC_the_MySQL-Server_is_on
6 b0 S9 v. c2 e - User_name=User_name_on_the_MySQL-Server9 j7 h9 p/ i2 D4 M# Q' k
- Password=Password_to_go_with_above_user_name) c! }9 e1 f' {! Z
- GetDriverFunc=getSQLDriverMYSQL
! G$ Q- N; I7 _8 b* E3 g& W - VendorLib=path_pointing_at_your_mysql_vendor_lib" s% Z3 G9 c) L( f$ X
- LibraryName=path_to_libsqlmy_libary K2 K' I! Q5 r. C- F; _
- Active=1
3 l) [2 C( d; P, i' q - ---cut here---- y2 u/ P0 X' C4 D
- In my environment (a linux box with a MySQL server running locally) I have:2 H' c2 e; S$ M1 N L7 j) z
- ---example---
5 ]1 a) d+ o; U! E* f: q - [DBEXPRESS]
/ R& H4 `) \+ L4 S5 ^ - sqldir=mysql_sql
0 a7 T1 e6 B, c$ S - Drivername=mysql
4 E4 `+ F2 K2 ^, l3 p, R+ {" j! a9 X+ ` - Database=test
! ]8 n0 {9 f8 h# S$ p: h* }) Q( @ - Hostname=localhost
2 z2 R1 x0 @! U0 ] - User_name=testuser
" d$ N" E5 f/ u4 s# K7 J9 k: C - Password=my_password. N- ~2 a5 P* `" \. G$ t
- GetDriverFunc=getSQLDriverMYSQL
( ~# B$ L: ~+ r r1 x% S - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) j" v/ V$ n+ n6 ]
- LibraryName=./libsqlmy.so
$ B4 q* f4 u% E6 R: f$ h0 g - Active=10 V2 x% p, a9 t# k& K& n7 R
- ---example---8 \/ m, F) O! x- t
- / q: T* }/ _2 A: r2 N8 F4 C
- On a windows box, also running the MySQL server locally, it would be:
6 W1 ~* Q1 N3 |* X - ---example---; v6 ]/ Y; H& O, Z- A- r
- [DBEXPRESS]
8 ?' h% Q% d5 l, `' l' g2 S - sqldir=mysql_sql
: ^% k5 ]5 U. k' e/ V c' l" ~ - Drivername=mysql1 P- n# X. P) q8 R) q& w
- Database=test# V- ~4 ]. @* @9 i& O& K
- Hostname=127.0.0.1
! J4 S/ c$ h: m - User_name=testuser" H' K/ T# }3 O R5 X' }, j
- Password=my_password
2 d% P/ R! ?! y, F - GetDriverFunc=getSQLDriverMYSQL
5 R7 a4 \# ^8 L; A- H - VendorLib=libmysql.dll1 q& p$ y4 J" l8 K/ ^5 ^
- LibraryName=dbexpmysql.dll
* `' u6 Z0 `( o3 B% }: r ]2 J - Active=1& [: c4 q9 D9 a1 K' {- u
- ---example----. J! S# ]0 [: V4 H" J6 p" i
- - written 02.03.04 by pwk.linuxfan$ o$ o7 ~6 z( j! B4 `
- & @% h% F* L, j
复制代码 |
|