|
|
麻烦翻译一下,下面这段文章:xhan
) D, |, X: \) t& W2 s: n
+ K. J2 z' ^9 S% j! C-
5 S$ ?& ]3 J0 o/ ?: ^ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- A8 i1 D* m5 _9 ]+ v$ b/ v8 a/ M
) D/ l' u" n+ u4 j- ### What we need ###
9 F* }( z' |( o1 K4 r - Naturally, we will need a MySQL server to store the data for us, this document
8 f; f# L5 |# g! h8 R6 r/ a( F8 B - will not explain how this can be done - there are documents out there for the * g* R& k& Z8 u" j% @ s" N
- interested. The requirements include a (empty) database for TeamSpeak to use
& K" [& ~! n; D6 q" @; q - and a user account (username + password) that has the permissions to do stuff
- k/ s+ w" q1 e. Q8 b - with the database. Additionally, you will need a vendor library installed on the
" _+ ]- b2 ]2 i, Q7 A* q - local machine, this came with my MySQL install.
' _- z! W' I, {1 D+ K: B3 [ - These instructions will not tell you how you might transfer your data from the
5 T: Q" C7 @8 r5 d0 I8 x - SQLite database to the MySQL database, we start with a clean and empty MySQL t8 L Q6 k/ O
- database.
# s6 X; m6 U, w; V - Some users have reported ways to import a SQLite database into MySQL, but at+ r: Y3 ?& n" M Q( N; `2 \: U
- the time of writing, there are still too many issues - check the current status- _1 s; O. S7 O7 [$ S% L- ~
- in the TeamSpeak forums if you are interested.
, r. O2 u( S# F. T! |9 B - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 j6 j! q% h) Z1 I0 R
- Borland was used. This driver can only interface with the client library that
6 {4 c, \' e; g3 d- B4 j - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- e9 F1 d1 h g8 j5 ]
- client library - basically all you have to do is to use a 3.x client library as ) L% J' @! m) |8 o
- "VendorLib" and a 4.x database to connect to.$ R5 [6 j+ N" O, a
- If you need more info about dbExpress, you can contact Borland.9 A- Q6 E$ {7 G/ E, B$ y! Z( S
- ; E- O& W6 v. Q$ Y
- ### Doing the work ###
, R3 d; S' r: I T* M( | - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 f, m/ D7 u" G. U
- the perquisites right, just open your server.ini file, and add this section at
2 ^$ k1 O: b1 m/ Q- q - the end:! r! Y X. x% w n" z1 X C
- ---cut here---
7 M7 m* e7 w: G g - [DBEXPRESS]
- \ g/ \7 B0 a, z - sqldir=mysql_sql
7 x+ A4 H# S ` - Drivername=mysql
1 G @( Z+ _) s9 I - Database=Your_Database_Name_Here& O( F$ y% |$ u
- Hostname=The_PC_the_MySQL-Server_is_on+ Q( R2 N7 t! j$ g* F( C
- User_name=User_name_on_the_MySQL-Server
# Z4 d" V! L! T$ \% Z" b, B! P" e - Password=Password_to_go_with_above_user_name
1 ]" {+ M' s2 m U - GetDriverFunc=getSQLDriverMYSQL, }+ \$ N, |9 j6 D
- VendorLib=path_pointing_at_your_mysql_vendor_lib
8 g# D2 K3 {9 F' I - LibraryName=path_to_libsqlmy_libary
7 q$ ?% H7 o6 p; e/ o( q - Active=1- I y z' U, |: T% E( X
- ---cut here---
5 }, k+ p% j" Q. Y/ r( D+ g" `% t8 v: v - In my environment (a linux box with a MySQL server running locally) I have:5 p" Y, e3 B z
- ---example---; r+ ]) F" E Y
- [DBEXPRESS]
5 {6 r; Z- |$ b% _0 p | - sqldir=mysql_sql) G# x3 Q$ t( Q. H& F, V
- Drivername=mysql
" i! J. }0 {, i/ `/ w3 } - Database=test9 j+ E$ h! W$ t$ }% \0 y/ d2 |- C) b
- Hostname=localhost. l; }9 m8 ]- B4 H1 [7 X
- User_name=testuser4 P0 J3 R* ~0 L) D6 x3 z
- Password=my_password
$ z5 {; t$ e! O. `8 P - GetDriverFunc=getSQLDriverMYSQL
, Z1 T" J! U$ K* J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( F. M( d2 ~6 d% B0 k" B
- LibraryName=./libsqlmy.so
/ F6 C. g8 ]) ?! I - Active=12 H, U3 o5 K4 b- {+ R1 N
- ---example---
" w c7 T" x& m D. B% K& {' p
9 n2 S" `( g% @# V5 j0 X- On a windows box, also running the MySQL server locally, it would be:
4 o7 {5 n: V% ~( M - ---example---
+ r* {; n( t h1 ?& v - [DBEXPRESS]- X# @/ C. X5 X+ c, |+ q
- sqldir=mysql_sql
# {7 @$ Y- x: m6 t! D% A8 | - Drivername=mysql- @" H7 |1 X+ U3 U+ D3 R
- Database=test
3 Q# u, q4 w. p - Hostname=127.0.0.15 W, B. @( K, E2 r% t
- User_name=testuser0 n5 u& F, p+ d/ m; V
- Password=my_password
- p% k# J' m, n6 f - GetDriverFunc=getSQLDriverMYSQL& q( C/ ~1 k4 w7 Q# P* y% F
- VendorLib=libmysql.dll8 y) j8 ]+ r, Z
- LibraryName=dbexpmysql.dll
+ ~, M0 [: _9 O& v - Active=1) H0 E* t' |1 R8 Y$ E2 C
- ---example----
+ z! m. ~: D+ a& w- i - - written 02.03.04 by pwk.linuxfan
( D2 Q4 ]' G1 [7 [$ X/ r) F9 b/ M% u5 r - 6 G) l W8 a$ E u0 I% k. } @
复制代码 |
|