|
|
麻烦翻译一下,下面这段文章:xhan
1 X" m$ T/ x5 H' F! d" U5 M& q. ^3 W) \" b1 ?- q
- 7 O+ w. l2 \/ q4 u( U3 x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 a# G; N5 M& f( b! v; F3 R, s! h
6 |9 @5 F7 ]4 \! ]+ o- ### What we need ###- C7 c! f: e x. ^; A
- Naturally, we will need a MySQL server to store the data for us, this document 5 p" L# _4 p" u* b) c5 L! g7 K, c
- will not explain how this can be done - there are documents out there for the
4 o: h P! l5 ^# p# u# g8 S ` - interested. The requirements include a (empty) database for TeamSpeak to use
: g. `4 Z! x9 r - and a user account (username + password) that has the permissions to do stuff
2 n5 t3 b& T+ z( I% b, c( w - with the database. Additionally, you will need a vendor library installed on the
, n! A1 L/ a) ^* O - local machine, this came with my MySQL install.5 l" q4 L& R7 n5 _
- These instructions will not tell you how you might transfer your data from the$ o1 B. ~( X& a; ]5 g
- SQLite database to the MySQL database, we start with a clean and empty MySQL
+ N A D6 Y& t - database.+ W2 z) [$ v) d7 r9 o4 A
- Some users have reported ways to import a SQLite database into MySQL, but at- a2 _& [ I) d i9 _
- the time of writing, there are still too many issues - check the current status
; B1 T& d1 j5 w' j - in the TeamSpeak forums if you are interested.
3 p) e9 q2 p# Q4 T - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) _, ]+ o. |5 G( x5 S- {/ z
- Borland was used. This driver can only interface with the client library that
}0 V+ I' Q2 ?' N+ N8 i - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 T" t3 }5 c A9 ^5 l# [3 V - client library - basically all you have to do is to use a 3.x client library as 6 f1 Q, A9 H0 R9 k G' L
- "VendorLib" and a 4.x database to connect to.
; X9 v6 e+ g2 r G" z) g7 t' g) y - If you need more info about dbExpress, you can contact Borland.
! _+ a3 t" z& N. B& ^' |
3 G: O$ @* Z1 e" o, K- ### Doing the work ###
. ]& |' ?, b! v8 r) I. D3 u) q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ K9 n! P) ^1 \ c) W4 P" U
- the perquisites right, just open your server.ini file, and add this section at
/ V: b# v$ q. |" M2 ] - the end:( J3 S+ E8 T( ^' d! E- B+ o
- ---cut here---
% E2 ^0 E }8 J5 {2 h - [DBEXPRESS]" J) d/ S p. x& E, I( U
- sqldir=mysql_sql2 k5 z( ^3 l3 A l% w- K
- Drivername=mysql
" b T( T$ O+ s9 E( M7 i - Database=Your_Database_Name_Here' r3 [* T3 \8 @' n2 J* e! [
- Hostname=The_PC_the_MySQL-Server_is_on
1 M: _% ~" W; P( r/ A- e - User_name=User_name_on_the_MySQL-Server
" J- E2 l* `1 D5 L& I0 o - Password=Password_to_go_with_above_user_name
2 R# Z c; y+ k - GetDriverFunc=getSQLDriverMYSQL
?4 h" }/ d X* s - VendorLib=path_pointing_at_your_mysql_vendor_lib; v" A3 z v" B- {* X
- LibraryName=path_to_libsqlmy_libary
! a: \( L- [$ m& g - Active=1
) j& t+ @$ [0 v& Q# c+ Z - ---cut here---/ ]8 e* v- x* ^
- In my environment (a linux box with a MySQL server running locally) I have:7 c# F" W8 t( R
- ---example---& Q( d; B) w/ `# h) B0 P7 C
- [DBEXPRESS]* ?( A$ g5 _+ |) b4 Q
- sqldir=mysql_sql. T5 q X) G- f
- Drivername=mysql
- ^% N+ d, N' P7 P# X& D( m7 R3 p - Database=test! A# w# ^0 ~; ]$ W: l3 ]$ G0 s+ P
- Hostname=localhost% U* J9 ]- \3 x- n/ Q
- User_name=testuser
+ a/ T$ h7 \ H& c3 M) e1 Q$ ~! P - Password=my_password
2 v% z9 Q) B6 }, ?0 N - GetDriverFunc=getSQLDriverMYSQL
! I7 @: C L9 w" o8 v! } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, _, {, Y- E( Z/ H/ S) I' ^
- LibraryName=./libsqlmy.so+ g c) A5 r' r$ X/ ~( t3 H
- Active=1) j. j1 A# n6 p/ a
- ---example---
$ A4 u7 q) W0 X' ~& w+ n9 } - : b* w, z9 c) Q9 ^: G
- On a windows box, also running the MySQL server locally, it would be:4 l6 z; ~4 j0 z% j% Q' ]
- ---example---
; I8 z$ C. v+ Z( M - [DBEXPRESS]
$ k8 g' _+ [4 u7 P0 x7 A - sqldir=mysql_sql
6 p% d* L2 N% e5 \+ h - Drivername=mysql6 i- o- l- E* j7 H' W. _$ c" x1 L. A3 |
- Database=test
" a ^! ]1 R& |3 L2 F( N& K4 O - Hostname=127.0.0.1
9 D e& l0 A; F, }1 r - User_name=testuser) y! k( {0 h% H
- Password=my_password
8 T, g5 p4 f) U% Y, ?3 ^: U' q6 A - GetDriverFunc=getSQLDriverMYSQL
! P1 _$ l6 q0 Q$ u ? - VendorLib=libmysql.dll& w+ ]: E/ U F/ @/ i5 h0 F
- LibraryName=dbexpmysql.dll
{5 F9 [. o' O5 ]" d: l - Active=1* `0 Y+ K/ G* d; \3 s
- ---example----4 h/ B. O4 `8 l& M# A+ C1 e
- - written 02.03.04 by pwk.linuxfan1 b+ R" ?+ q- C- {( ?3 x
" u- t' g; `& |6 J) A" C
复制代码 |
|