|
|
麻烦翻译一下,下面这段文章:xhan 7 ^. Y6 C$ l1 h2 i0 L
7 \6 H/ s4 \1 N: i- \$ @-
4 ~& @" `+ I5 s% ? - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
6 S. I I) u5 U+ D3 J
, M% S7 B: N3 x) @- ### What we need #### V T6 }9 p$ P: d: _% b
- Naturally, we will need a MySQL server to store the data for us, this document 0 e/ \3 r4 V" F9 l' E
- will not explain how this can be done - there are documents out there for the
4 Y& j3 n7 _4 J, c5 @ - interested. The requirements include a (empty) database for TeamSpeak to use
- j9 z" S- W/ @2 I1 @& c - and a user account (username + password) that has the permissions to do stuff. R9 I' b5 ?+ z7 U0 f2 I& G" y
- with the database. Additionally, you will need a vendor library installed on the
; j1 A: L& b$ _9 C; l# } - local machine, this came with my MySQL install. i: k; k) f7 @
- These instructions will not tell you how you might transfer your data from the6 M) C0 X" G! K6 y
- SQLite database to the MySQL database, we start with a clean and empty MySQL
% M4 ]2 J$ |. i3 b1 W6 o - database.
3 G% D; T# e' A8 \% g ]+ h - Some users have reported ways to import a SQLite database into MySQL, but at
3 n) `) q1 [8 `0 ~; v - the time of writing, there are still too many issues - check the current status
6 w7 _, \. S+ z% `( H - in the TeamSpeak forums if you are interested.5 {1 r2 R+ k; s& X: J
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, E! O3 k: Z% W1 e" c - Borland was used. This driver can only interface with the client library that
: z! x: X( \6 k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
) G! X* Q6 @/ Q O9 H - client library - basically all you have to do is to use a 3.x client library as % |% b; C' N5 B) L* i
- "VendorLib" and a 4.x database to connect to.1 |4 X; w7 J, H, g0 r4 `& I( H
- If you need more info about dbExpress, you can contact Borland.3 L6 H- Q+ S! t/ a
, u( d0 g, C( y- Y: G5 T0 ^- ### Doing the work ###+ M# R+ x$ O+ @7 v& G' p8 F
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ K- d. T. T H) r - the perquisites right, just open your server.ini file, and add this section at! M/ X9 q5 J- u8 |0 D% y
- the end:- k* D- N# c- W* |* L) t. V
- ---cut here---
$ z- T# C% f( g! c* y0 f - [DBEXPRESS]; B7 e; E% [0 e4 Q& B* C
- sqldir=mysql_sql
# [- R* U' X3 B4 o5 C1 m0 Q6 ? - Drivername=mysql: j! @: i7 j# X
- Database=Your_Database_Name_Here( W, k* ?3 X- `3 W$ H7 S0 }' X
- Hostname=The_PC_the_MySQL-Server_is_on
4 x" ?/ `7 T4 l! `; E - User_name=User_name_on_the_MySQL-Server
3 P+ W! }6 h8 H0 h) @2 b0 G& U# p - Password=Password_to_go_with_above_user_name
& H9 H3 U, A5 t, d - GetDriverFunc=getSQLDriverMYSQL
3 Y1 k1 Y- s9 ? - VendorLib=path_pointing_at_your_mysql_vendor_lib
. Y$ W6 I; V a$ U$ M - LibraryName=path_to_libsqlmy_libary) Y" O* a4 w2 O' i
- Active=1% y( r1 e' k1 P- ?7 _2 d
- ---cut here---- C- B: q! T/ C1 c+ g+ k
- In my environment (a linux box with a MySQL server running locally) I have:' n- I8 s7 a9 u
- ---example---
/ d6 S5 l6 E u c - [DBEXPRESS]$ i$ K5 }% L' G" ^
- sqldir=mysql_sql7 B2 x. [* C& Q7 g/ C
- Drivername=mysql
; e) a' p" [( @( q0 L' u - Database=test8 i( r4 u, I8 K. @$ Q+ I O; D
- Hostname=localhost
" G0 q* H/ W( U! y7 T. E7 [ - User_name=testuser8 ~4 H! h" M4 N" F
- Password=my_password: e/ K. ]3 t( M% {
- GetDriverFunc=getSQLDriverMYSQL Z* m# `' g. e8 t
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
9 a$ R/ P* O" e4 R, z - LibraryName=./libsqlmy.so# M6 L; Q. ^ {$ F) Z
- Active=18 K& c: h% t0 Q8 B; K
- ---example---
1 B5 N3 b8 y1 D! x0 q! F
% }3 p! p) R& E- On a windows box, also running the MySQL server locally, it would be:
) k% X. q. A1 f - ---example---
. Y# a5 y6 n! k0 w: e' z3 x# \ - [DBEXPRESS]
$ m3 s3 Q9 O7 P+ |. T - sqldir=mysql_sql0 S- Y& ]* u* \1 K/ B: I
- Drivername=mysql
& Y3 R* R: J s1 z! B4 P" t1 R - Database=test
; i. e8 F% ^! s - Hostname=127.0.0.1
& z: ^; M Z6 j9 R3 s K+ n - User_name=testuser
" V" ^+ V( S& I! H - Password=my_password |4 H/ g5 {* ~6 X0 Z3 a% W4 y- j
- GetDriverFunc=getSQLDriverMYSQL
" Q6 K# Z& y. J& a0 j - VendorLib=libmysql.dll1 O) F' W8 b( N5 D! s2 ]! D$ ~
- LibraryName=dbexpmysql.dll) e) {! |5 k, M% a) y, o4 n8 \
- Active=16 D) X1 U3 e4 k: t( z; \
- ---example---- |8 ^/ J; @# K
- - written 02.03.04 by pwk.linuxfan
) |1 Z& k7 ?. x4 v7 r - . F* j4 T4 ]$ K$ B1 [
复制代码 |
|