|
|
麻烦翻译一下,下面这段文章:xhan & I$ Q: l* X: h+ J S$ ]% w% S
1 X+ j% _, r) x' z" i' ^1 l
- * U# T L1 j& y/ |( |% ]' h
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 {( Q2 x1 G, m; Z, u, B& T
- ! F) p- N+ L$ `; L5 X$ ^: V
- ### What we need ###
! {5 d! i, v1 W. }$ M - Naturally, we will need a MySQL server to store the data for us, this document ) z* K7 h4 o7 |# t, K- h: V5 [, ~
- will not explain how this can be done - there are documents out there for the ) K; B: j6 m. P0 H
- interested. The requirements include a (empty) database for TeamSpeak to use8 ~7 C. q; c5 e/ P
- and a user account (username + password) that has the permissions to do stuff; E, h2 Q# y- d+ Y, W& g
- with the database. Additionally, you will need a vendor library installed on the
# B; S2 @7 r/ f5 @0 f& I+ w3 u - local machine, this came with my MySQL install.
5 i: {0 e% W$ D - These instructions will not tell you how you might transfer your data from the
& F2 ?: h' s# h9 m" h) x - SQLite database to the MySQL database, we start with a clean and empty MySQL* r# @; q" S M3 [2 K! j5 ~
- database.
6 U e4 O" u- [( s& H9 l - Some users have reported ways to import a SQLite database into MySQL, but at
! `. c6 w& r# R1 M# D - the time of writing, there are still too many issues - check the current status
t, Z. e7 ], d: @& I - in the TeamSpeak forums if you are interested.
% j! ]# @/ e( |% B W7 F - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 y" O/ H1 d/ R
- Borland was used. This driver can only interface with the client library that , a+ m9 {/ `: q
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, {/ {* N0 w+ c1 l6 u. F
- client library - basically all you have to do is to use a 3.x client library as
4 p+ \& a9 f; M) o% s- L - "VendorLib" and a 4.x database to connect to.2 D8 M7 J/ h# j( E* q$ r0 i
- If you need more info about dbExpress, you can contact Borland.! J c9 P F- W4 ?
- $ \( J; b4 L* p4 r' }' w: I
- ### Doing the work ###
' E. L* _- }+ W6 q7 L M# P* V - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
& {' i7 [ v- ^5 o - the perquisites right, just open your server.ini file, and add this section at( e' S" y9 N3 _# y
- the end:
0 q$ q+ B o0 R# P7 I) K - ---cut here---9 u* T# S" l4 g$ G* M! ?
- [DBEXPRESS]# G N9 C+ h; N
- sqldir=mysql_sql/ y* G9 @/ x) G# `# i( x% T) x
- Drivername=mysql
+ S+ ~8 r P5 W! A+ k0 L, C0 w4 V - Database=Your_Database_Name_Here
# m, Z* E4 Q7 I' q/ L - Hostname=The_PC_the_MySQL-Server_is_on
: A1 I/ m% J3 I. G r2 G. D - User_name=User_name_on_the_MySQL-Server
2 l4 z& k* u, z; t. Q8 N - Password=Password_to_go_with_above_user_name1 A7 L5 U% a f/ i
- GetDriverFunc=getSQLDriverMYSQL
, |1 X, z! ]1 \ - VendorLib=path_pointing_at_your_mysql_vendor_lib, ?( p8 e6 r, W. y6 r) o
- LibraryName=path_to_libsqlmy_libary7 _( c, c2 b) I. v5 J6 t; c
- Active=13 ` ~3 s) A6 X# K3 w2 @2 J
- ---cut here---
: z, H3 @: r; {, h5 w3 A - In my environment (a linux box with a MySQL server running locally) I have:
( N, G* P0 U' k0 B$ I - ---example---9 [2 A9 R: w0 i. F, q
- [DBEXPRESS]
6 k& W0 [' ]& ^' T0 z0 } - sqldir=mysql_sql
" k/ `+ e' @+ F ` - Drivername=mysql
' _3 Q0 A' ^- v& \+ n - Database=test
n! h9 q! U" S0 c* U4 X - Hostname=localhost
O( B4 c' s* j, b8 V! R - User_name=testuser q; n& \7 U: j6 p3 s
- Password=my_password7 Z7 ^) W, V) q* H2 r/ s
- GetDriverFunc=getSQLDriverMYSQL
|2 F f: F$ x4 h6 \& @& N& K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
6 U( C6 P8 G6 m; j% a - LibraryName=./libsqlmy.so. C( y( i b; ?2 U- D
- Active=17 K/ S7 ]1 X/ r4 U0 o% _# a
- ---example---
* D% }: }- I$ I" u; g
. B: o7 C8 b! ]* l0 a- On a windows box, also running the MySQL server locally, it would be:2 Y- M6 [0 h" D' ^+ M! |8 c
- ---example---
3 T# l6 x/ ?( z9 d; X) f" J - [DBEXPRESS]! n0 i7 b9 m. j4 q7 f4 x
- sqldir=mysql_sql: Q2 t0 z2 ]1 \" Q* {- d. U2 ?
- Drivername=mysql3 [5 a" @3 M# T8 W1 X/ @3 {4 p4 L% M; ~
- Database=test
* o" g, M* a ^ - Hostname=127.0.0.1
+ _! I7 C% C; J0 |9 H; N - User_name=testuser
( P# `# S& o3 i5 B. f, k- d - Password=my_password$ P9 D: O0 {; _$ }8 i0 g
- GetDriverFunc=getSQLDriverMYSQL' j5 |( x" N: ]- N0 }. n
- VendorLib=libmysql.dll
5 Y X/ o0 X8 H2 j' ~: o - LibraryName=dbexpmysql.dll# P8 R2 O* G2 {9 {8 @1 ? ~
- Active=1- ^# j4 o' h8 z
- ---example----
$ q E0 |, B: n" @3 D" k4 z: t - - written 02.03.04 by pwk.linuxfan2 y) R; t3 D2 F" H9 ^& x$ u
( O; h7 l6 V- c0 h# k
复制代码 |
|