|
|
麻烦翻译一下,下面这段文章:xhan , B, u& }- l- N% H7 _
, E$ B! r" J% V; U- G
-
, S+ B( y# s9 ]4 d - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# B7 g( \1 q+ I9 t* p$ P, c9 e" H
" a, d8 M" C: ~" U4 ~8 |, P6 a- ### What we need ###
! Q1 M2 i' S+ _ - Naturally, we will need a MySQL server to store the data for us, this document
4 l% e4 z6 \+ O) u - will not explain how this can be done - there are documents out there for the
- p. ~" d& r* O- i9 \& Y - interested. The requirements include a (empty) database for TeamSpeak to use* j) j# R$ ^. E- J- e( U
- and a user account (username + password) that has the permissions to do stuff' l2 E7 j4 d8 F' {* R2 Y* T, ^
- with the database. Additionally, you will need a vendor library installed on the
. a; L' m! Z( o3 ~7 E1 h - local machine, this came with my MySQL install.
5 Z2 P* R8 ?. [: |1 m2 u3 H' z - These instructions will not tell you how you might transfer your data from the
$ x( ?/ W: M( d - SQLite database to the MySQL database, we start with a clean and empty MySQL
+ |7 H2 O1 D1 W8 U - database.
& _" z( U, y: h4 F9 j0 H+ ? - Some users have reported ways to import a SQLite database into MySQL, but at
O) H& k" Z D& f) D - the time of writing, there are still too many issues - check the current status
& ^3 i, Q9 D% ~7 E5 j' ^ - in the TeamSpeak forums if you are interested.; b& k- t0 H1 C+ G) X
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 K* Z9 w2 F" o, x0 z& d- y - Borland was used. This driver can only interface with the client library that , |6 j2 ^0 i+ q& C U. X: X. v
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ J C% D( c: N, D
- client library - basically all you have to do is to use a 3.x client library as 6 y6 W- V# z2 Z: b! K8 @& a
- "VendorLib" and a 4.x database to connect to.
# ^* [ c/ X& w8 X% | - If you need more info about dbExpress, you can contact Borland.
, E$ @/ I: I v* W- g - 0 Q' f9 O8 L' S6 k% ^5 `9 N
- ### Doing the work ###8 g* U- l7 S O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 e/ B7 n+ t" J$ P) }7 j! ? - the perquisites right, just open your server.ini file, and add this section at, a5 o2 q |) a. P! _
- the end:
9 z' Q7 i3 c) v. c4 M+ Q - ---cut here---
1 C$ P2 t* k+ L' [ - [DBEXPRESS]
- a4 {3 r3 S* G% Y3 p: \ - sqldir=mysql_sql
7 y* H. V/ F. M) ^* O ~5 \ - Drivername=mysql
$ u7 t1 B& x f - Database=Your_Database_Name_Here% P! n" o9 O7 ~: ~- f% y
- Hostname=The_PC_the_MySQL-Server_is_on
0 P$ J3 f9 d0 S9 x' T - User_name=User_name_on_the_MySQL-Server+ p) m1 j- l: F
- Password=Password_to_go_with_above_user_name( |& H7 ^7 o0 `' g1 j7 o: @) s
- GetDriverFunc=getSQLDriverMYSQL
) c/ g2 b& |& M, _# d/ x - VendorLib=path_pointing_at_your_mysql_vendor_lib4 U' L1 D. a3 I6 E
- LibraryName=path_to_libsqlmy_libary
- i' G: [9 ?( }7 @ - Active=1
9 v* p- [" M) h; A - ---cut here---
( s3 [: X! j1 q3 H# P! [ - In my environment (a linux box with a MySQL server running locally) I have:# Q: t8 e1 ?* S8 y- K2 `
- ---example---$ X+ f) E. K3 N+ r( A8 j' r
- [DBEXPRESS]
+ W; K0 }* k) s4 C3 |/ A - sqldir=mysql_sql
+ ^) a% y1 @1 ^" c- r - Drivername=mysql1 e0 T! y0 O" }0 r; a! c/ J* p+ z
- Database=test
3 p B; k- T& x* N1 j% f c x - Hostname=localhost
$ s6 H" a/ g& ? - User_name=testuser" n! {* m6 \. J, |
- Password=my_password
* Z, U, _6 k" P, N& ]! L - GetDriverFunc=getSQLDriverMYSQL# Z W, y# n, b6 g$ P! F
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 L/ E9 P8 b0 o! `$ _
- LibraryName=./libsqlmy.so
* _+ f" H' x# c - Active=1
; i* Z6 `: h m) c+ c - ---example---: {. n; S) d5 s0 @# Y* Z
- ' m& ^+ o3 H' I0 f! S: u9 N* L
- On a windows box, also running the MySQL server locally, it would be:0 A, @0 q4 e# R
- ---example---4 D6 F0 D) e2 w
- [DBEXPRESS]
: s* l8 B3 u$ f! n. z - sqldir=mysql_sql2 K& V" X! L$ D. B, U: q
- Drivername=mysql* Z% ?* |& v* W! ?& e
- Database=test1 b) L8 t* [) m6 f2 H0 J( O1 X
- Hostname=127.0.0.1& _- I. W/ v. u% R2 \ L8 B
- User_name=testuser
" ?3 R" W3 y& _ - Password=my_password
" E7 |6 @2 G' Q+ L4 V: B E - GetDriverFunc=getSQLDriverMYSQL7 z4 L( o6 _& k( L9 V, l
- VendorLib=libmysql.dll- c! y2 F, D2 v$ F% o
- LibraryName=dbexpmysql.dll
( D6 `$ m( O4 |; h( A - Active=1
@0 I# y) E! y" r - ---example----
$ H7 P4 [2 c' ^2 r3 D4 {2 Q - - written 02.03.04 by pwk.linuxfan
3 O( r7 J5 f( `# Q - ( V5 Y) ^$ d* H" }( J3 |- b# X) g
复制代码 |
|