|
|
麻烦翻译一下,下面这段文章:xhan * E. K/ j, y5 F: W. F5 A
3 ]: r2 ^( q0 M. Q" w' E-
" W7 h# s4 t( s8 z9 T! Q" V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! g1 g& a/ L/ j# |( _* e, V - 5 g, }! l$ D0 ]4 [
- ### What we need ###, f! S; Q6 M; o( }) M6 F( Y y7 f7 B
- Naturally, we will need a MySQL server to store the data for us, this document
$ m q \3 `7 g5 E0 Q7 I - will not explain how this can be done - there are documents out there for the
* e* Q8 x7 F- Q1 B+ r; P* M! G5 Y" u, g - interested. The requirements include a (empty) database for TeamSpeak to use3 ~# I' [0 g; ~% C2 N9 B% m2 F
- and a user account (username + password) that has the permissions to do stuff" ?+ P% g( s! u5 u( i! t
- with the database. Additionally, you will need a vendor library installed on the
3 B3 Y* D. m5 E/ Y! ?- N - local machine, this came with my MySQL install.
1 ^* g* G3 Q/ V, {, S9 U0 A - These instructions will not tell you how you might transfer your data from the# p* p p1 q' _/ G* _ s% g! a
- SQLite database to the MySQL database, we start with a clean and empty MySQL
- }0 @' V) D! B- | - database.. l T2 B, H# g6 h
- Some users have reported ways to import a SQLite database into MySQL, but at
# v: x1 Y \6 r4 X8 p9 H - the time of writing, there are still too many issues - check the current status
* r; ~7 _1 Z% ^ - in the TeamSpeak forums if you are interested.7 ~7 f) V1 x! x/ x
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 i. D1 E- m, t' n1 `
- Borland was used. This driver can only interface with the client library that / @4 w1 j* L; m% z! N
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
" a2 y/ |$ P3 M; E8 F - client library - basically all you have to do is to use a 3.x client library as . j( e( w( f( B: d5 N
- "VendorLib" and a 4.x database to connect to.3 \* a1 g/ v- u# b C
- If you need more info about dbExpress, you can contact Borland.
. U4 v2 F* [/ T. k; R
5 X9 U" `; V; c6 k- ### Doing the work ###
! d' [9 \ Z7 c G - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; F4 Q- |& u! _1 n9 `' o
- the perquisites right, just open your server.ini file, and add this section at0 A% o3 Q# \& @# _: n6 [
- the end:' A( l+ h& J8 {2 q
- ---cut here---. S1 ^' E6 Q% H4 F- b4 l7 o
- [DBEXPRESS]3 z8 o$ ]1 L- e5 ]; A
- sqldir=mysql_sql
8 C4 Y9 f6 M0 I' j+ ]5 n9 | - Drivername=mysql
% |& ]% b, P& T J: d Y8 C; N4 p: k - Database=Your_Database_Name_Here
: o) n r- \( U1 ]. m2 @% B - Hostname=The_PC_the_MySQL-Server_is_on
' ]! h; a) j- S: W - User_name=User_name_on_the_MySQL-Server
/ r2 e1 @8 d5 k2 B3 e9 I! E - Password=Password_to_go_with_above_user_name N9 i/ ^; W R6 @' ?
- GetDriverFunc=getSQLDriverMYSQL
7 v9 t; g8 r& O - VendorLib=path_pointing_at_your_mysql_vendor_lib
8 W: U% D" p) ] - LibraryName=path_to_libsqlmy_libary
" B) f" O: `0 \5 m - Active=1% M2 k8 K- |( R7 u& l9 d7 u/ G
- ---cut here---$ V4 d( v4 U" p' A* r; A, Z
- In my environment (a linux box with a MySQL server running locally) I have:
: L" T1 \6 f' R7 x y5 \- o1 I$ S) j" | - ---example--- m/ t# ]. F% \1 _$ J3 V" X( A
- [DBEXPRESS]2 M0 s% @' S5 n" K0 ~ R! E
- sqldir=mysql_sql
8 |# N8 ^, ^9 F, E$ U9 z - Drivername=mysql
" K! J; d2 b9 [ - Database=test
c0 Q. [, ^ N9 \ - Hostname=localhost5 D1 H8 e4 Q [" x4 z
- User_name=testuser
: w$ X3 z% ]% s0 z3 `! q - Password=my_password
* d" t! h: v; c$ d9 ]0 g - GetDriverFunc=getSQLDriverMYSQL& O5 ]3 ^6 |4 a; f! }7 v' p
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 N4 @8 P8 p) \( i1 j - LibraryName=./libsqlmy.so* q9 j' g2 X2 }5 x7 Y6 ?9 s
- Active=1& a, I# m% a! G' N: H$ H/ |
- ---example---
6 C% h, Q* r/ s0 o7 J0 } L+ | - 4 D' |- z7 `9 z y- h) D4 v
- On a windows box, also running the MySQL server locally, it would be:
. Y8 H( q: j% F# q- x1 @8 \! S! A - ---example---
( o( W, Y6 B/ d - [DBEXPRESS]0 v$ Q! N2 R; i L* h& `0 p6 g
- sqldir=mysql_sql" X6 d1 ~/ k( I7 M
- Drivername=mysql2 F! n8 T+ u- g& G9 v
- Database=test6 ?- O- r2 b" Y5 \( K4 w
- Hostname=127.0.0.1$ `0 }/ e, r# T; q
- User_name=testuser
9 E. W" B! O% x3 Y/ t1 L' A - Password=my_password
; s7 K6 P/ Y. H% H8 x3 q( T8 }1 t" M - GetDriverFunc=getSQLDriverMYSQL
& @( q3 }0 U; G) s* i - VendorLib=libmysql.dll
' ^2 f7 `; S( R) u3 ^ - LibraryName=dbexpmysql.dll
x% L9 J, r- }1 \' O1 b6 c2 ~ - Active=1( n& C! W& `, ^/ U9 @6 E
- ---example----8 N$ ~: y$ R* K
- - written 02.03.04 by pwk.linuxfan: e# ]5 D3 v) p7 A$ z
- - s! u: r1 u% R! W% P# A6 M) G
复制代码 |
|