|
|
麻烦翻译一下,下面这段文章:xhan
- |- {5 s/ w) J9 F3 d' r, h( ^- }4 a9 q; U
- " q _! f: A! I
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######' v8 J# ]: v( o
2 l0 K1 G( N* L, G- ### What we need ###. t$ I9 a7 a1 M" x c
- Naturally, we will need a MySQL server to store the data for us, this document
# O& J! a7 S# |5 w' J5 h7 o" O - will not explain how this can be done - there are documents out there for the 8 B0 U; W" g( T, g1 B+ T& @7 @ y
- interested. The requirements include a (empty) database for TeamSpeak to use
: g2 \& @) H6 Y - and a user account (username + password) that has the permissions to do stuff
4 W% R& l6 W5 L0 q- w! L - with the database. Additionally, you will need a vendor library installed on the
- R9 d* _" X. s7 f! u: h - local machine, this came with my MySQL install.- ^* g! g6 c, `
- These instructions will not tell you how you might transfer your data from the
, H$ \7 F k( Y - SQLite database to the MySQL database, we start with a clean and empty MySQL6 r3 s6 Y% [" C% X' B2 W5 q4 B
- database.4 p. U2 Z: |4 m% _
- Some users have reported ways to import a SQLite database into MySQL, but at
' z/ x. O3 k: `3 x Q - the time of writing, there are still too many issues - check the current status
# b: c2 m% m. O7 ~0 R - in the TeamSpeak forums if you are interested.
4 }, ?9 Q; p: H; | - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 V3 r1 A& W& N- P/ O. |
- Borland was used. This driver can only interface with the client library that
" j! J3 N, D- y K% ]7 x0 V: \ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 C! j' R. j. l2 }1 e
- client library - basically all you have to do is to use a 3.x client library as
; L7 X+ ]( {7 W, T3 ~ - "VendorLib" and a 4.x database to connect to.
9 b; c7 N, O2 `: }3 v: \7 }+ ~ - If you need more info about dbExpress, you can contact Borland.0 b3 i& `2 v! M+ n. u& t5 |
- 6 ^/ ^* ^* j' [: V
- ### Doing the work ###
5 z( Z5 K. d/ ?$ ^ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
* \: S2 y/ @% e7 @8 u5 [ - the perquisites right, just open your server.ini file, and add this section at
; M; C7 g- f. M% K, g- A1 l - the end:
9 P& V8 @( ~2 ^9 `6 y2 ^6 O3 K/ N2 r - ---cut here---5 q9 [+ v2 l) n+ L* X: S n
- [DBEXPRESS]& h" ~7 U. [# S7 K# I$ A
- sqldir=mysql_sql
2 c5 V4 T& H; F1 ^ - Drivername=mysql
% y$ Z" N! Y6 Q* N9 _. T8 ?" @ - Database=Your_Database_Name_Here
3 w0 p- ^, ?: j5 r( j - Hostname=The_PC_the_MySQL-Server_is_on
7 J4 t j9 ?+ f8 p- d - User_name=User_name_on_the_MySQL-Server
% T* x0 X6 y# y) u( d% h; H - Password=Password_to_go_with_above_user_name
! l1 D1 d! M0 H. Y; B9 ~ z - GetDriverFunc=getSQLDriverMYSQL' b2 y" j4 G& J3 C8 Y# A$ u+ D" a2 @0 k
- VendorLib=path_pointing_at_your_mysql_vendor_lib, P" z9 n6 u4 B
- LibraryName=path_to_libsqlmy_libary. y9 S7 {+ ?1 g1 D6 a
- Active=1 R# Z$ g- k2 L2 W! c
- ---cut here---
. f- ~8 l/ X& l& V, B - In my environment (a linux box with a MySQL server running locally) I have:
/ V" t+ P0 b4 d$ [# X/ ? - ---example---
) R- S- j" w* a2 G: _$ _, ] - [DBEXPRESS]
0 h: {* w$ b( r7 M2 b - sqldir=mysql_sql
' d2 ]9 I+ x7 e4 Z - Drivername=mysql
& u( r# I" b1 f& O# r - Database=test
) V' v) U% p" s0 D6 j - Hostname=localhost( |0 `0 t& a$ u# V( N
- User_name=testuser
' N# P ^7 N4 ]/ W7 e% X - Password=my_password# l' s+ W- N: a+ z0 y- R* z5 g
- GetDriverFunc=getSQLDriverMYSQL
7 Z; N. J3 l0 A- S! N% u) _" G7 Y8 D - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
. C ^4 T, i4 l/ y/ D4 z - LibraryName=./libsqlmy.so
3 Y" g) l# w% L& T4 n C3 q - Active=1
. t5 P% o" r% q: ? - ---example---% q2 t8 O; \+ V4 H
& Y- C U+ J& T! L) s# y- On a windows box, also running the MySQL server locally, it would be:
8 \, C3 W+ |6 I+ H7 B9 p: h - ---example---) g/ J, }5 W3 m5 h
- [DBEXPRESS]7 y$ _$ S; w( E9 A0 J- c: U
- sqldir=mysql_sql
2 g6 n/ W# {1 U7 c/ B - Drivername=mysql
- Q, E/ Z* a- |! I - Database=test
! C+ y, L) A1 |: ^) l - Hostname=127.0.0.1
/ [8 t/ M* C; g4 k! E - User_name=testuser
0 B4 }$ n5 }7 d/ y/ ` - Password=my_password
: m- W; o. E7 F9 B: _# m - GetDriverFunc=getSQLDriverMYSQL2 I1 W4 @6 C+ w. W5 @. Y
- VendorLib=libmysql.dll
$ O" h G6 T c6 @4 A) d9 J - LibraryName=dbexpmysql.dll1 I+ \ s- h. L% @$ A6 w
- Active=1
0 ~* I3 t$ ?: D" G% V3 `. E9 H - ---example----
5 m* A9 J/ b# y" g5 Q' k - - written 02.03.04 by pwk.linuxfan
* H' p$ O* l) H; G/ q
" j F' K- l2 T8 y) E4 N
复制代码 |
|