|
|
麻烦翻译一下,下面这段文章:xhan 6 }+ s, f, ?% W& k* G
2 a5 S- n* ~, A& q4 ^-
' L$ _( g6 A$ V K. U/ k& N8 u - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######, F) n8 h; x7 } g! v" P
5 u; L: x8 n* H2 n+ g+ |- ### What we need ###! _- K% ]+ F+ N6 A" v7 k3 v1 K
- Naturally, we will need a MySQL server to store the data for us, this document ( p# Z8 p$ q6 {; u
- will not explain how this can be done - there are documents out there for the ! [ ~8 y, ?" ~0 M" J( U
- interested. The requirements include a (empty) database for TeamSpeak to use
i3 B. U, N) `4 ` - and a user account (username + password) that has the permissions to do stuff) @& }1 |0 e% ] l
- with the database. Additionally, you will need a vendor library installed on the! N$ }1 U1 o$ |5 v
- local machine, this came with my MySQL install.* Q- z/ d+ p- z, r3 E7 [
- These instructions will not tell you how you might transfer your data from the
$ |8 P9 B- J- k* h9 ` - SQLite database to the MySQL database, we start with a clean and empty MySQL
5 z- Y* L5 ~# t! U+ G8 T( F) f - database.( y/ X3 v" W5 u6 y- A
- Some users have reported ways to import a SQLite database into MySQL, but at
[% ^$ G* m% X) W; U! ]5 |/ u - the time of writing, there are still too many issues - check the current status
: h0 r3 T. d1 R/ [3 s) b - in the TeamSpeak forums if you are interested.8 W7 b+ q V% J7 _
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
3 [. o) C, F& N2 U6 |! Z. j2 [ - Borland was used. This driver can only interface with the client library that
% B5 V; v6 Y5 o. c: \" B - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: \- _; Q( U3 o" \0 P1 J
- client library - basically all you have to do is to use a 3.x client library as
9 b5 E, |* x! J3 l) A: C9 p( h - "VendorLib" and a 4.x database to connect to.
6 ~9 ^3 v4 G, ^ - If you need more info about dbExpress, you can contact Borland.
( S; ~ U. U" j U6 V0 x; x1 M) ]% P - & P9 F! }7 j" h9 c: H
- ### Doing the work ###2 m( Q+ d% E! I4 Z0 m
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# y1 g1 g# a3 M3 Y) R. c - the perquisites right, just open your server.ini file, and add this section at
3 s. y) |7 m' \0 \" s7 S - the end:0 Q7 d! O1 C+ X r( k
- ---cut here---
* C. K: b: P! P8 V - [DBEXPRESS]8 X8 v( s1 ]! g W0 U! ^
- sqldir=mysql_sql1 j5 n7 \9 q" M8 J" b
- Drivername=mysql- x. a+ L! D( u5 r9 V0 m. p
- Database=Your_Database_Name_Here
R' v' l9 @, j* Y- N; u - Hostname=The_PC_the_MySQL-Server_is_on; u1 j, ~, n/ s" B3 g
- User_name=User_name_on_the_MySQL-Server
* F5 _, G) `! M - Password=Password_to_go_with_above_user_name2 [) o6 S( _& J8 j5 G+ u. k
- GetDriverFunc=getSQLDriverMYSQL
K Y0 b* Y+ v - VendorLib=path_pointing_at_your_mysql_vendor_lib, ]- U% u& o5 |0 @+ w. F5 u6 c
- LibraryName=path_to_libsqlmy_libary
- s+ b2 ]5 X; c% v - Active=1
9 X4 \6 j) n/ ^% t& J# R - ---cut here---
. E; u) T$ e: @ S! Q - In my environment (a linux box with a MySQL server running locally) I have:
" F, Q: Q$ h5 w/ j) W$ q+ r - ---example---
* N( n: H0 J+ I: j( R8 [9 L - [DBEXPRESS]
7 ^6 P! {$ A! e: s - sqldir=mysql_sql. u" n8 G$ n# E' m
- Drivername=mysql
. t# z7 ?7 I5 z; y3 _ - Database=test* f: E( n1 R& W; u- {, K
- Hostname=localhost
3 f$ M$ R7 D! p - User_name=testuser
2 y; H2 P$ s) m' Y0 K& l% I - Password=my_password
9 d) w# A* D. |1 @* E. a* } - GetDriverFunc=getSQLDriverMYSQL
- B3 U9 L+ ?7 @6 d2 p+ X; H - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" l; q# H# O" Y+ S& z2 A - LibraryName=./libsqlmy.so5 A) J% r) r4 P2 z+ ?( F7 N
- Active=14 J8 X/ p- c0 f. u# z& i
- ---example---
; U/ W* Y/ Z$ h+ ]" t% q
$ j" q4 |' Z* ?& R) u) { y0 d- On a windows box, also running the MySQL server locally, it would be:* O2 h) H a. V
- ---example---
$ g8 V% Y' }3 i A$ w3 z, M. k8 T - [DBEXPRESS]/ B2 c# a( Z4 m* x$ ?
- sqldir=mysql_sql4 a( O4 h$ b6 l4 ~2 \& G2 X
- Drivername=mysql
; r. k9 ]' @3 @) Z( N v8 j - Database=test$ V7 ?* K* }& D8 Y. Z4 K
- Hostname=127.0.0.16 J- C7 t) p$ z; q1 s
- User_name=testuser
% g3 i/ p3 P. d+ } - Password=my_password$ P V8 m4 s7 M r) B$ y5 h
- GetDriverFunc=getSQLDriverMYSQL
4 ^- j/ P! u5 L: s& N5 f4 ` - VendorLib=libmysql.dll
' R/ m( I2 \, |9 o9 {3 j - LibraryName=dbexpmysql.dll
6 _6 W" X' V$ ?0 q& m: ~3 i* e - Active=1
, q/ w- E l4 m# K9 L - ---example----
' x. v$ U9 {/ S% I0 o8 b - - written 02.03.04 by pwk.linuxfan. z0 e ~+ n0 d8 `3 i5 g
- 7 {3 f. r* I1 Q
复制代码 |
|