|
|
麻烦翻译一下,下面这段文章:xhan # y/ |' B; F6 H9 P+ p$ F4 u7 W h
1 [, `7 @2 e# o* @ f! `, v
-
" Z% x. N4 u5 R" q7 Z o0 J - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 B% A4 M( f# M- l - : D; P" _- O6 o# |: q& v+ Q
- ### What we need ###' N7 j7 k6 @2 h2 _3 J2 L, @( z
- Naturally, we will need a MySQL server to store the data for us, this document
1 C0 p9 w3 Z8 x( z/ b - will not explain how this can be done - there are documents out there for the
, X, V2 \" U1 D7 }- Q - interested. The requirements include a (empty) database for TeamSpeak to use
* S: z. p( x; L% r4 i% i N - and a user account (username + password) that has the permissions to do stuff
8 D7 T" n9 F9 E9 v# Z$ o - with the database. Additionally, you will need a vendor library installed on the
7 O0 }" ^6 K" p' @0 Q - local machine, this came with my MySQL install.9 h+ ^' ^! A3 h9 E
- These instructions will not tell you how you might transfer your data from the
6 M+ `5 h# Q, E* m5 D - SQLite database to the MySQL database, we start with a clean and empty MySQL
" n5 y; g4 i, B- F. p - database.
1 B& u c/ W; V$ z2 ]1 v$ t$ l - Some users have reported ways to import a SQLite database into MySQL, but at1 |; t. n5 \/ C1 f: T
- the time of writing, there are still too many issues - check the current status4 _7 i3 P$ e! f, d2 t
- in the TeamSpeak forums if you are interested.3 m1 J( K! g" t v
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% Y s9 X6 Z7 @! N2 b, C. x% i$ u - Borland was used. This driver can only interface with the client library that ' y' x0 ^0 ^9 F! f4 \
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
K: J$ ~& ^! Z& h* W2 t - client library - basically all you have to do is to use a 3.x client library as
3 `, C# Q$ e5 a; T$ K/ y( C - "VendorLib" and a 4.x database to connect to.3 P3 a5 f, F, b3 q
- If you need more info about dbExpress, you can contact Borland.
5 t: J4 w+ a: P: E. z1 y - 3 s" u% C# \0 B6 g
- ### Doing the work ###
1 K1 B9 P" O. K9 F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& x# \+ H; E1 c9 E3 w: x1 z
- the perquisites right, just open your server.ini file, and add this section at
. u8 ?4 b3 `2 b ^ - the end:
) y/ `* l W1 t2 K2 n% ]" A0 l! p - ---cut here---) `, K- K! t0 P# m: H& x; p& b6 N
- [DBEXPRESS]
) y2 M: j3 t& N% Q. Z& t - sqldir=mysql_sql
' M& W5 {! r9 M" n - Drivername=mysql+ w1 Z: x1 r- d% [% C9 r
- Database=Your_Database_Name_Here
, U7 i1 R' f0 |& m - Hostname=The_PC_the_MySQL-Server_is_on O# }' P0 u1 ]7 D/ Y
- User_name=User_name_on_the_MySQL-Server* A6 L+ ]2 O, F n6 @
- Password=Password_to_go_with_above_user_name
7 Q8 }) F2 ^2 n( w: w9 b3 ^& X @ - GetDriverFunc=getSQLDriverMYSQL$ n" p- F p; E9 D, f- y. w- }
- VendorLib=path_pointing_at_your_mysql_vendor_lib( l2 b5 z& O! R+ Y7 Q
- LibraryName=path_to_libsqlmy_libary
" Y: i+ U- W5 A% w. C# a2 x; d - Active=1! o' j8 ^8 a% p- Z
- ---cut here--- Y( c7 O+ N4 u- r, N2 E
- In my environment (a linux box with a MySQL server running locally) I have:$ B& \5 V" ^' U9 f
- ---example---
9 o, j8 p! u. P0 k6 R+ A - [DBEXPRESS]/ J3 R4 I( K1 X. @9 Y% E
- sqldir=mysql_sql
) E2 Z A& {# o0 K - Drivername=mysql
: A3 B' Q* C8 u; N2 w% ~ - Database=test
3 w% X8 W1 ], H - Hostname=localhost
& a# `9 f! V$ ]( z+ N3 l- c - User_name=testuser* S. T/ A2 a4 ]: P' y! v
- Password=my_password
6 x$ L( u S, w3 l - GetDriverFunc=getSQLDriverMYSQL$ r `; i& @7 s r, f
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
' Q# @* f- r4 i7 z: S. U' k - LibraryName=./libsqlmy.so
4 C. T/ M$ b3 y. K5 `1 Y# A, u - Active=1
5 C- |& A" p) u$ }3 c) ~ - ---example---! R% z3 K. b- K
$ ?. Y& I% a2 X* F+ K- On a windows box, also running the MySQL server locally, it would be:2 X8 }- d4 T: n1 h# @! ]- V. n: r
- ---example---
/ a2 {: r/ i# N5 X& L1 G1 J - [DBEXPRESS]# i' E! p9 j, W8 w
- sqldir=mysql_sql& t" n o1 `/ W' ]. A$ w
- Drivername=mysql: @7 K9 s+ Y8 Y. S# I. r9 A o s
- Database=test
' o' P9 c. \' D& e6 s - Hostname=127.0.0.1# S- g2 t# B0 b( Q
- User_name=testuser
2 ]9 F& U; e: H6 \1 e6 q* W - Password=my_password7 G( F: }9 u: W. z/ o. q( E# ~& |
- GetDriverFunc=getSQLDriverMYSQL
5 _: c# w4 U$ w, u/ Y+ l) m - VendorLib=libmysql.dll
* f x7 q6 y9 t" N$ ~" a$ p - LibraryName=dbexpmysql.dll
4 `( @0 n; o% i3 N" [ - Active=1
1 M/ A) Z9 L+ M# Q - ---example----& N2 {; h* c/ o* Q1 U6 _) ]3 w0 c
- - written 02.03.04 by pwk.linuxfan
# J+ i3 ^' y; t% @1 c - & U' P1 \/ g3 y6 e
复制代码 |
|