|
|
麻烦翻译一下,下面这段文章:xhan 9 }7 D0 n4 B. Q( W8 b0 L L
9 A9 W7 L% [" k5 Y
-
3 S+ I( [: \5 P' b1 ?, U; C" e: |9 ^" O - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: y4 m3 F; {% {; N, ]7 E1 { - 4 V1 E, c: v8 }7 c6 y8 {, A
- ### What we need ###) U" L7 U' A9 e5 j2 X% _
- Naturally, we will need a MySQL server to store the data for us, this document
* f! [ X9 q* A - will not explain how this can be done - there are documents out there for the ( z3 i/ u& o1 x" N% k
- interested. The requirements include a (empty) database for TeamSpeak to use
1 k. b8 h# B. T3 F - and a user account (username + password) that has the permissions to do stuff
1 F6 s5 O8 G; t- l- q) U - with the database. Additionally, you will need a vendor library installed on the
- R/ D) ~, j# e8 O; k6 |( P, ^ - local machine, this came with my MySQL install.
7 ^ N$ \7 j, ~, \0 r i0 J - These instructions will not tell you how you might transfer your data from the: w2 S3 ]9 f/ e9 u8 _; P
- SQLite database to the MySQL database, we start with a clean and empty MySQL
/ F( U! E, i5 D( d& a - database.
# N* @; @4 ]6 q" o! ~ - Some users have reported ways to import a SQLite database into MySQL, but at3 F& T3 J8 l& _6 ]9 d& e* X
- the time of writing, there are still too many issues - check the current status. S4 ]! a3 J5 b
- in the TeamSpeak forums if you are interested.
: ?' p2 j% {, ?0 o; S1 | - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from! v! ]& q0 G& `' W% z) L
- Borland was used. This driver can only interface with the client library that
% a) h1 Q6 c+ _0 v) `" p( y( c, F - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 i( R& J3 v$ \- B3 Y - client library - basically all you have to do is to use a 3.x client library as * J0 l2 d0 c2 S8 B
- "VendorLib" and a 4.x database to connect to.
) |9 m9 F4 F! F9 q. j - If you need more info about dbExpress, you can contact Borland.
# s6 E- O8 s, D0 B7 m! [2 u) O: V
5 d8 y1 q/ j' Q* w8 q- ### Doing the work ###
& t4 V0 ~5 |$ e1 i) v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 q' `7 ?4 a* r, w9 e# J; M# c+ I - the perquisites right, just open your server.ini file, and add this section at8 |$ o. L; E f8 {* e/ `/ n
- the end:
3 Q3 ~ l. a i+ } - ---cut here---
i4 I3 c5 r" l/ t1 e( z0 M1 p1 W - [DBEXPRESS]
( }1 S8 N7 B& \8 Z0 E# Q/ q: J - sqldir=mysql_sql
, N% Q3 _- ` F, C" p1 w( O - Drivername=mysql
0 Q8 V" ? M/ v& v: L# M - Database=Your_Database_Name_Here
) C" K5 J+ K0 h3 L0 S - Hostname=The_PC_the_MySQL-Server_is_on/ Q$ Y1 u% P1 R6 i/ U( A# r
- User_name=User_name_on_the_MySQL-Server
E" w( Y4 @9 { - Password=Password_to_go_with_above_user_name5 \4 T( ]4 G2 `& w7 y( U
- GetDriverFunc=getSQLDriverMYSQL7 N8 I; O* H- d! N
- VendorLib=path_pointing_at_your_mysql_vendor_lib
4 K& t/ p0 I& c) U1 I - LibraryName=path_to_libsqlmy_libary
! x1 w" t7 U: R" S! `" y, r - Active=1
+ |7 m1 W2 z" ? - ---cut here---
9 s/ i+ ~; `9 U0 c) Y$ Y" p* H9 H - In my environment (a linux box with a MySQL server running locally) I have:
$ J6 Z F8 ^0 G - ---example---7 L4 O2 w$ M9 e+ d% A8 T
- [DBEXPRESS]+ _( [& U4 K/ w. G, B; b
- sqldir=mysql_sql
5 {' N$ s( k: ]: c8 ]. o" n0 F - Drivername=mysql
' z. T* j/ ?( m$ U* @ - Database=test# g% j9 u: F, G& |! o9 }* ` i
- Hostname=localhost- h9 u& Q% B3 a2 ]4 D, u8 b. h
- User_name=testuser3 L! E" K( a# F( ^
- Password=my_password6 P4 n) {) y7 R* x
- GetDriverFunc=getSQLDriverMYSQL( Q: c( N) Z6 N; G' {# p+ c# t
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
4 O( D, d- [) h! {. O - LibraryName=./libsqlmy.so
" ?2 X" c0 v' h& l) b' `. ?. A5 b. j, i - Active=1
' l: N1 x# l$ z' b |9 X - ---example---' @5 O. _& O9 j. s
- ( x% b! z& A% ]! U% w8 K
- On a windows box, also running the MySQL server locally, it would be:
1 W* U( a* m( z) e! Z: R! o - ---example---3 W, p$ f: y# E M7 F$ A
- [DBEXPRESS]
' A2 M1 `1 [' Z8 h5 V - sqldir=mysql_sql
* Y* J% m1 E% `# L - Drivername=mysql4 X7 n( U/ x' r
- Database=test, Y$ ~1 [. {, M: Z6 [# I* B9 I2 B
- Hostname=127.0.0.1
5 a; ]0 ^% h" h' w1 K5 q/ s4 _% n* b - User_name=testuser
/ C. j" b$ ?* Q" k1 c7 Q. _( M - Password=my_password
* z# q4 p. U* @! z3 F - GetDriverFunc=getSQLDriverMYSQL
& I9 I' A' c6 A0 `" y* B) T Y' v - VendorLib=libmysql.dll3 a; Q! O8 A) ^) d7 N! N, |' {
- LibraryName=dbexpmysql.dll$ ^* T8 V/ o! t! O0 T) l Q3 e2 ]
- Active=1
! b2 P& O! U+ @8 J1 t - ---example----: e" _2 T0 Y6 s% a7 C2 @) P
- - written 02.03.04 by pwk.linuxfan7 w/ X* u0 R3 M' ]* D+ b" q
- ' L+ m* ]5 @0 t/ u9 t+ s. {: Z- O/ A
复制代码 |
|