|
|
麻烦翻译一下,下面这段文章:xhan % G* H2 O% T1 K
+ `/ T) p1 C. q) Q. U
- ' ^$ ?" u5 R9 @8 h
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. r+ X8 e6 }- B! n
' Q: i( x/ `! N1 ?/ e- ### What we need ###
- u& i4 p2 U( O) K2 e- E5 D5 Y - Naturally, we will need a MySQL server to store the data for us, this document
0 E% k2 O; N: O6 c - will not explain how this can be done - there are documents out there for the 3 {! i' G2 P+ \- v& ^
- interested. The requirements include a (empty) database for TeamSpeak to use
5 f; a/ q# w' x$ X, P& [ - and a user account (username + password) that has the permissions to do stuff
- n# x( Q. h6 y A - with the database. Additionally, you will need a vendor library installed on the# u# a Q; ]& Q
- local machine, this came with my MySQL install.
$ ]! q$ j# t2 T0 j6 Y. ` - These instructions will not tell you how you might transfer your data from the* k, J9 y! f- n
- SQLite database to the MySQL database, we start with a clean and empty MySQL. X4 S/ n1 P' h6 f5 h
- database., U* c0 ]* h1 x. k) m" D
- Some users have reported ways to import a SQLite database into MySQL, but at
3 B3 W* M! f( m - the time of writing, there are still too many issues - check the current status
+ M6 _( {" J3 v/ Z5 t - in the TeamSpeak forums if you are interested.
! A" Q* F5 D! k9 j' o# P - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
# L5 p- P9 B# ]0 u) d - Borland was used. This driver can only interface with the client library that 0 ^+ u4 [" o; O0 z/ w% n$ ^
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 f0 [( q. l0 ?( C. b
- client library - basically all you have to do is to use a 3.x client library as
. G* a' T5 l+ D* K" \; {% D3 q - "VendorLib" and a 4.x database to connect to.
D! A6 K% {' K# W - If you need more info about dbExpress, you can contact Borland.
* M* q* } U8 ?/ n6 ]5 w - . g1 |; \5 j- p7 _
- ### Doing the work ###
2 I" {( F! |+ y. a6 ~1 ` - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all# G9 I! ], F3 N% L; l: F& _
- the perquisites right, just open your server.ini file, and add this section at
/ s: N; Y9 S3 Y; z8 ]- p3 W - the end:1 G7 q6 X& g4 Y& t1 y1 u- {
- ---cut here---4 v: q, Z5 T' ^
- [DBEXPRESS]$ w. {5 x6 X- F% R% V/ E( |
- sqldir=mysql_sql, p0 }2 ~9 T! m! `; D% z
- Drivername=mysql6 I! X% w# j5 |- e
- Database=Your_Database_Name_Here
: W, k) y8 D7 E. P& T - Hostname=The_PC_the_MySQL-Server_is_on
: U+ _% E, l: ]) x8 t$ A- }) q0 U - User_name=User_name_on_the_MySQL-Server
& _/ r' \" i6 `8 R- [1 c - Password=Password_to_go_with_above_user_name
+ \$ ~- G8 r" ~4 E. g+ w# n* n - GetDriverFunc=getSQLDriverMYSQL, z1 V: Y! f4 V* f* P l: C# ~
- VendorLib=path_pointing_at_your_mysql_vendor_lib* y, Z5 h X' r: Y+ H
- LibraryName=path_to_libsqlmy_libary
2 U3 l8 G4 e* T' T C6 r9 R- k/ e - Active=1; S- X3 N/ }# h# {
- ---cut here---
" c4 o8 H- t! ^' F& \% \ - In my environment (a linux box with a MySQL server running locally) I have:
8 [4 P3 }6 }# D& K/ b - ---example--- l3 A8 [" i' v: Y% n' |
- [DBEXPRESS]
) Z/ m& u) z5 w- f1 w. O - sqldir=mysql_sql o3 \& q g9 {% n& @- a
- Drivername=mysql
# |5 L6 b/ H! P/ N, J) G$ } - Database=test$ ^$ I! r8 n5 h
- Hostname=localhost
" ^9 N( d& ?" f( W% v, K1 Y - User_name=testuser5 _& h5 L Y. Z* Q- e: j
- Password=my_password
! h% a# ~# ~( ]3 z - GetDriverFunc=getSQLDriverMYSQL
3 s* G4 C5 n* E* t, C, N ^& n - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.09 O+ P; C1 R C/ M2 k% w
- LibraryName=./libsqlmy.so6 r3 s8 F- ^4 p/ p4 g5 f. N
- Active=1$ O/ e: B" P* E! f9 N. b3 [
- ---example---7 ?5 p( A2 v! u3 y2 e
- 1 C( X0 Y% e+ q0 o7 x
- On a windows box, also running the MySQL server locally, it would be:
6 j( Y: ]- C& P4 g; @4 r - ---example---
/ M2 S6 W, }5 ^ - [DBEXPRESS]2 s6 Y7 H. u E+ r+ `" \8 `/ }
- sqldir=mysql_sql7 Y. |8 n( R$ A9 A, L% A
- Drivername=mysql
, m& B( |+ ]- `, \7 v6 b( {9 ` S - Database=test
9 G6 o% F# E" i7 |! a( q6 D* y9 R8 n - Hostname=127.0.0.1
; s! p8 ]$ q2 u9 w; M - User_name=testuser8 ]9 p1 J/ w$ ]
- Password=my_password- I; p+ ^* N. L2 c# G% ]* r" O# V
- GetDriverFunc=getSQLDriverMYSQL: C- b$ d0 I" w3 \
- VendorLib=libmysql.dll
" j# S; M' x$ { - LibraryName=dbexpmysql.dll
6 C$ \4 e9 m' d& u+ d% p$ m - Active=1
3 k; q; @9 z) s$ Y% R6 {1 F9 d - ---example----- P( v1 F, V8 e4 S! n% ~
- - written 02.03.04 by pwk.linuxfan+ v/ X# S! G# ?, l- P& p
8 |; j$ D& b* }
复制代码 |
|