|
|
麻烦翻译一下,下面这段文章:xhan
6 S8 k6 {+ y6 t& L$ _; I/ g5 W
4 h9 m+ p: t! ~/ ~4 ^5 _( b-
% L+ v: L& j0 F$ s8 \ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( h/ n2 k1 C5 X+ G# N! z8 i: ^, A! d
* u) ^( H; s1 a n' w" v8 G) T- ### What we need ###
; U9 M1 x# |. u8 x( k9 s - Naturally, we will need a MySQL server to store the data for us, this document
9 [) P a6 `! `7 g. h @ - will not explain how this can be done - there are documents out there for the
0 K9 N. V7 a: w, v# ]' Q - interested. The requirements include a (empty) database for TeamSpeak to use
% Y2 U w3 Q7 `2 l$ n* E - and a user account (username + password) that has the permissions to do stuff$ {* Y: D. `5 l" l Q
- with the database. Additionally, you will need a vendor library installed on the
' Y) T6 C7 S4 n' M+ C: [. m1 s! x - local machine, this came with my MySQL install.1 o& f, R j3 B0 W
- These instructions will not tell you how you might transfer your data from the
+ g$ ]( r9 j' E$ \! _1 V - SQLite database to the MySQL database, we start with a clean and empty MySQL
6 o a% E( |6 i8 C - database.
& i6 f' k& u/ z' [9 |6 y - Some users have reported ways to import a SQLite database into MySQL, but at0 f/ ^; L, Y' x7 @7 ^5 s
- the time of writing, there are still too many issues - check the current status) f! n9 v% I }6 X: g
- in the TeamSpeak forums if you are interested.
; n8 G1 Q8 n5 W. J8 }4 V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
! t% f& k& ]9 u1 h# B - Borland was used. This driver can only interface with the client library that 2 N, }. I0 E, P1 Z8 [5 ^
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, _/ e0 a2 r& z
- client library - basically all you have to do is to use a 3.x client library as 2 [5 X n1 d7 j
- "VendorLib" and a 4.x database to connect to.1 E7 U$ L4 ^0 U/ o! A
- If you need more info about dbExpress, you can contact Borland.; {3 b3 o; G; H5 [3 ^3 I: p
+ Z( G( a: P! n+ N9 b3 @- ### Doing the work ###
* Y: N/ \ V w* X% `* N7 } - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
m+ |/ X4 p7 b9 `, O* [ - the perquisites right, just open your server.ini file, and add this section at# H/ z7 z% V& `% x- r- w3 [9 t
- the end:
! U' B" ?4 n5 U - ---cut here---) A3 X1 V; N* W4 m
- [DBEXPRESS]
, }- h7 h6 h% ^- q @ - sqldir=mysql_sql H2 U7 D, D7 G6 S- |. Z$ D
- Drivername=mysql; h2 h! T6 H C2 O% v* K8 ~2 T
- Database=Your_Database_Name_Here
) ]0 W2 P% z- M& ^% F& \. e - Hostname=The_PC_the_MySQL-Server_is_on
* I4 H7 z9 w5 ~' N8 u" Y - User_name=User_name_on_the_MySQL-Server8 E; ?" f$ H/ M- b! E) d
- Password=Password_to_go_with_above_user_name
. s3 g! y8 s7 v5 h. R6 _* D - GetDriverFunc=getSQLDriverMYSQL
* w' g# Q h% t8 g) P h3 J - VendorLib=path_pointing_at_your_mysql_vendor_lib
4 \7 v( y5 Q; B8 ~9 X, Q - LibraryName=path_to_libsqlmy_libary
, r' ^; N! W/ U6 N7 W6 Y - Active=16 D4 m; B) ?3 [3 C
- ---cut here---
$ V/ T5 c. V* A: e0 M - In my environment (a linux box with a MySQL server running locally) I have:9 X+ Q* @$ n l$ R7 `/ ?
- ---example---( \; Z# A+ j- d- j6 U$ u0 K2 d
- [DBEXPRESS]
& j0 ^; O# j! n2 m; ? - sqldir=mysql_sql; \+ O; T Z+ a3 i3 N; S! z8 ~
- Drivername=mysql. n% c+ c; w5 J/ V, `* b
- Database=test- h _' b" d. f8 ?% t7 ]
- Hostname=localhost* {. \ }- |" q& y
- User_name=testuser
( M" b7 D' Y5 U/ O+ Q" S4 r - Password=my_password
( {$ R' O5 D5 L9 k' @9 D2 K( {/ o% X- j( A - GetDriverFunc=getSQLDriverMYSQL' S8 c0 T9 O, p$ b9 v7 X8 w/ J4 ~
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: D, B4 A3 E0 `- j* H. X1 R - LibraryName=./libsqlmy.so( G% g* s5 @: A. t
- Active=15 ?& f. K" L! P' a1 H6 y
- ---example---
' w9 {$ p3 R' r; L U0 o) \ - : J0 {/ f2 P% A, Y
- On a windows box, also running the MySQL server locally, it would be:
, [) j4 |6 p% I) t - ---example---" m! k6 X# C+ A* T6 w
- [DBEXPRESS]
0 v7 O( x; S" }- ~( w - sqldir=mysql_sql
4 S7 c- @3 H o6 c+ Z# E9 ~* j* D - Drivername=mysql
: |+ y( c( }% G$ l - Database=test
' v# S& J/ V* K - Hostname=127.0.0.1
! p0 B( h& T @* N4 W! \- ]5 M5 { - User_name=testuser
% s; x, [- c. S1 M - Password=my_password
# O- M$ ?* l3 R `+ n' Z - GetDriverFunc=getSQLDriverMYSQL; O4 a6 G$ ]' W, f/ H; @* Y, @2 t
- VendorLib=libmysql.dll
/ m1 X1 b$ O4 n, @" W - LibraryName=dbexpmysql.dll
3 C- H9 j' f8 Q% Z& n1 Y - Active=1
" ?9 y" S; i e: t% H( ~ - ---example----: P! ?1 b* D7 G+ n! }" ^' S
- - written 02.03.04 by pwk.linuxfan% ~6 R) S8 `/ B- }" H# i6 c
- / n! F3 N# S4 N6 t2 } b
复制代码 |
|