|
|
麻烦翻译一下,下面这段文章:xhan
+ b7 L# A" i6 ~: I7 C' \: Y1 S/ @$ G X; o; C4 C& {5 m5 q
-
" i/ A# J% Z3 _( p - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! r3 C$ N( T) _5 ~! C1 l, e' W0 Z6 C - 5 Z' L& T% l$ h
- ### What we need ###
4 [# _! H* n1 t8 N& ^% ?' H - Naturally, we will need a MySQL server to store the data for us, this document . L/ f# I0 c' z4 p' i
- will not explain how this can be done - there are documents out there for the $ ]) T1 u+ H) I# o# A k
- interested. The requirements include a (empty) database for TeamSpeak to use A4 C- x0 b( Z# Y4 ^: t
- and a user account (username + password) that has the permissions to do stuff1 m0 o/ m$ Z2 b- B
- with the database. Additionally, you will need a vendor library installed on the
5 L$ \& F9 G2 K7 P3 a - local machine, this came with my MySQL install.7 R, N8 n! J& E2 J9 w7 Q- X0 G$ E
- These instructions will not tell you how you might transfer your data from the
* {1 f& f4 T3 U: Q" f - SQLite database to the MySQL database, we start with a clean and empty MySQL
) S$ y) @$ s5 {4 \7 m0 ~ - database.
1 [/ _$ l: [3 c0 L, Y - Some users have reported ways to import a SQLite database into MySQL, but at
; }' v y* E( S1 t - the time of writing, there are still too many issues - check the current status
/ @8 p( q" l: Q# D2 ^9 k( m - in the TeamSpeak forums if you are interested.
, d1 \. f# h; A. X" Z - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: u0 ?$ ~. i7 h2 U - Borland was used. This driver can only interface with the client library that : m' O1 M! v! S h1 j8 e
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 L- A5 Q( Z) E
- client library - basically all you have to do is to use a 3.x client library as
( y2 F/ k1 q6 S. U - "VendorLib" and a 4.x database to connect to.2 ~ s" {' r5 e' C" w
- If you need more info about dbExpress, you can contact Borland.# ~2 O( g) w+ D9 ]$ ]8 n
6 n8 s5 G0 F+ a% A4 W- ### Doing the work ###
( }+ x' k' E M1 U) f - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, J6 c2 s( _. G7 P& U9 S - the perquisites right, just open your server.ini file, and add this section at
5 y5 F: ^7 v5 n3 m - the end:) d& `$ y! R' D% n) n
- ---cut here---4 e; H Z2 Y- }2 p8 V) G
- [DBEXPRESS]/ I' A1 k' ^7 I3 H/ T3 b& p
- sqldir=mysql_sql d# H F3 ]' o* |
- Drivername=mysql
- {9 T( e+ [5 E0 n" h( F: C1 G! \1 T n! D - Database=Your_Database_Name_Here
# c. ^- I6 E+ @7 M) X: R% N - Hostname=The_PC_the_MySQL-Server_is_on
$ Q# U1 N5 c+ ? n8 { - User_name=User_name_on_the_MySQL-Server
3 G# n& `- ?. w$ q8 f - Password=Password_to_go_with_above_user_name7 p( a6 q) j4 O7 N0 E) y4 T
- GetDriverFunc=getSQLDriverMYSQL8 I, _" A8 u" B, e- i5 x, V; q9 q
- VendorLib=path_pointing_at_your_mysql_vendor_lib
; O8 q) g# a3 I$ O7 h - LibraryName=path_to_libsqlmy_libary
3 k1 T& _2 z: Z5 Y4 N - Active=1
9 i9 e9 `: ^' R/ Y - ---cut here---
9 ?& I$ F8 m6 ~8 D - In my environment (a linux box with a MySQL server running locally) I have:
# h2 ?! z$ S2 J( z$ `( \, U' o - ---example---
2 s8 y( ~- u% \ - [DBEXPRESS]' U" ^8 k5 ]' n1 \7 Z
- sqldir=mysql_sql# @+ B8 Y7 E- _# s; L
- Drivername=mysql
U4 V; `0 Y9 f+ i; J - Database=test' b+ l" o- O$ f3 d% A$ q
- Hostname=localhost
1 Z2 J) d. R- @2 @7 T) q - User_name=testuser" z& i0 a/ B/ U' P! r
- Password=my_password
6 {. u; I& ?5 V. k7 A1 {7 o2 h - GetDriverFunc=getSQLDriverMYSQL
; V9 [* {& K# ^- t& B6 ~1 U; n8 T - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0: \/ _- n; ~% Y# N# a4 K
- LibraryName=./libsqlmy.so9 n4 c. h, Y4 I5 C3 _- L
- Active=1& N0 o" m' a0 O0 z, v! c L
- ---example---( `2 S9 p9 b0 h1 U$ @" m; ?! C
# G! m# K9 O: ~1 Z% q- On a windows box, also running the MySQL server locally, it would be:' X/ }; x* ~7 d$ @+ x! ?* ?. X( x1 ^
- ---example---* ^5 W) J4 [! j0 Z6 ~! B
- [DBEXPRESS]
7 A" r% |3 } v8 c# l$ P! p! `) L - sqldir=mysql_sql
* A. b( i$ q4 a) X - Drivername=mysql
6 L$ W9 [% A2 S" S - Database=test! a! i9 @; J" X" u4 B
- Hostname=127.0.0.1* [" F9 W6 s1 q1 j. s1 O" {0 G
- User_name=testuser
5 ?1 W! @3 q' F - Password=my_password- G3 d3 j( I. Q5 |2 ~$ g
- GetDriverFunc=getSQLDriverMYSQL
1 {3 v3 E) \! I - VendorLib=libmysql.dll2 N6 i& M6 l1 Q0 U- M5 Y8 A
- LibraryName=dbexpmysql.dll8 B9 I7 C# Q) U6 j
- Active=1
# o( W2 X/ b0 S, A2 l - ---example----1 h' F6 j; x. U% k9 I! A0 W
- - written 02.03.04 by pwk.linuxfan& b9 E$ D8 d$ i3 I9 \ w+ ~
9 ~* z" K# g; A0 _
复制代码 |
|