|
|
麻烦翻译一下,下面这段文章:xhan
) c& `' ~, [& X! W' z5 N7 J8 ^5 Y
( g( ^3 ] t( f D6 A8 L-
/ F, {: Q! |: X) ?" a/ G) G4 q. ? - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 {$ H/ G: T, J3 k - 6 y4 K* ^, b' j- ~: |
- ### What we need ###- P0 R3 f4 ^; x, ~
- Naturally, we will need a MySQL server to store the data for us, this document
+ X! K+ U2 m8 t8 l& W$ V: o - will not explain how this can be done - there are documents out there for the
- _: V+ o5 {2 d - interested. The requirements include a (empty) database for TeamSpeak to use: `3 b" S0 n8 E' K' p
- and a user account (username + password) that has the permissions to do stuff
' e6 d0 f4 x5 `2 f, o) d - with the database. Additionally, you will need a vendor library installed on the Q% r& s( K! d S o7 s
- local machine, this came with my MySQL install.7 }% A6 D; b8 j/ C
- These instructions will not tell you how you might transfer your data from the) Y; i% I: C) `! H1 \. @
- SQLite database to the MySQL database, we start with a clean and empty MySQL& _) C' B& U1 c1 ?& O% _2 a0 O" i4 E ?
- database.
9 i$ j; k" I9 J7 w1 u# E( t - Some users have reported ways to import a SQLite database into MySQL, but at
8 N: z+ m" i- X" f' l& A' A - the time of writing, there are still too many issues - check the current status0 O8 \$ J3 Y+ ~/ m7 Y
- in the TeamSpeak forums if you are interested.
7 P8 U8 T. a1 ? - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* v+ ]- ^8 |( W% q$ S9 A: `# K - Borland was used. This driver can only interface with the client library that
+ _% Q) E0 l T' R3 d6 P - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 Y4 _" }" L0 G% u/ ~& v
- client library - basically all you have to do is to use a 3.x client library as
4 B& M: l. K9 O% S1 k - "VendorLib" and a 4.x database to connect to.
: |" y6 ]$ a7 u7 k4 N* d, t' u - If you need more info about dbExpress, you can contact Borland.# M, f/ _8 @' l/ p: k
- ! @& E3 w% \% O8 f
- ### Doing the work ###
! w9 U+ S& c2 b- l, C1 L - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ u1 v9 K. o5 @) b( V - the perquisites right, just open your server.ini file, and add this section at
* R4 V. R/ n" {. |- j - the end:
8 @1 K- Z; f% k! E6 N$ s) x - ---cut here---
- R( ]# C% ?& ~ - [DBEXPRESS]
$ D: p9 e9 z u6 @! J- x! i( Q7 } - sqldir=mysql_sql( Q/ a* A o& d4 n( g
- Drivername=mysql
, w- J9 M y* t+ L - Database=Your_Database_Name_Here0 L% M7 z5 j" W7 I4 Y( s1 h
- Hostname=The_PC_the_MySQL-Server_is_on- j) Q9 q `. v m" P
- User_name=User_name_on_the_MySQL-Server, i& @ n8 J5 Z0 @1 U6 L( B7 s
- Password=Password_to_go_with_above_user_name" [5 P1 D* x) @! |) x4 Z' B, t( ^2 L
- GetDriverFunc=getSQLDriverMYSQL
5 d9 }4 P! q: p y% t* o. p - VendorLib=path_pointing_at_your_mysql_vendor_lib
5 L, P3 R; Y1 r. _+ J - LibraryName=path_to_libsqlmy_libary
$ d& b! c: p" U4 \; D8 ^3 H& t _: X - Active=14 p" ^$ P# b- t& U0 k, X! _
- ---cut here---3 a+ J) `% s5 p
- In my environment (a linux box with a MySQL server running locally) I have:
2 g" h& r. X/ x, b - ---example---
* x- t1 ^& |: z% g [0 } - [DBEXPRESS]. q! ?) M- k$ z" [" t; i
- sqldir=mysql_sql
5 ^ z9 m6 x' J - Drivername=mysql8 ^! J* p4 {6 y* P2 ^, V- k$ L
- Database=test- D/ T! _ p# ^. t* V5 ]# U
- Hostname=localhost
& @! ~/ d& _# w. C0 c - User_name=testuser& ~* ?" B" l% b4 s) a
- Password=my_password
* z& g7 _1 J* d - GetDriverFunc=getSQLDriverMYSQL: ?6 _8 U3 A0 e! b
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ w3 x7 J! u6 H- L; V
- LibraryName=./libsqlmy.so
% @+ I( u4 E4 O6 ~& c - Active=1
( n* ^! s, z2 l' N9 b - ---example---* O7 V0 w1 w( \
- 4 g4 j3 x3 Z( _9 E' {* w
- On a windows box, also running the MySQL server locally, it would be:
' s. m, J& I% v" s" C - ---example---
- Q4 x7 z3 A6 A6 n' Q - [DBEXPRESS]4 I( \! X( h0 e
- sqldir=mysql_sql
4 E" s9 B0 F; s L$ e0 A! h6 E8 { - Drivername=mysql5 N+ o# Z2 Q3 y! T
- Database=test4 ?/ w# r- o7 {0 j4 N6 R0 `
- Hostname=127.0.0.1. N, E9 ~, u* l/ q N4 y# v5 n
- User_name=testuser' J. F/ b; U5 w& \
- Password=my_password
; E! ^/ q& u' [4 L( j, ~ - GetDriverFunc=getSQLDriverMYSQL
, f+ {2 W. J# {0 M A' a - VendorLib=libmysql.dll9 d2 F/ ^: N Y- d2 [, W+ S2 q
- LibraryName=dbexpmysql.dll
0 w' `+ T0 R. f: X' s! [: L1 B - Active=1/ ]$ j* }& M& B' |! k8 S6 C
- ---example----
! D( Q' h+ y$ ]5 h! O - - written 02.03.04 by pwk.linuxfan
. e7 L, i4 e: G4 G7 Z
' j+ ]8 W6 |+ i/ C
复制代码 |
|