|
|
麻烦翻译一下,下面这段文章:xhan ' t2 z5 [: ?( p1 y& f2 E, m
# n1 ]# r! L+ j7 w4 w( D5 D0 L* W% q- & q. I3 I4 I4 N8 U# g
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& q! X9 i8 Q4 n+ u( z+ J5 @- _* k - . t- C' ?$ d+ I1 L+ ?
- ### What we need ###, \& y- d8 H; T
- Naturally, we will need a MySQL server to store the data for us, this document
$ X/ n9 C/ l. M k: j; f - will not explain how this can be done - there are documents out there for the
/ X, X7 q3 f8 t4 G6 E) h" X - interested. The requirements include a (empty) database for TeamSpeak to use$ ]- O1 m5 z9 S1 G
- and a user account (username + password) that has the permissions to do stuff
; V$ u3 G% d3 ]2 N$ _: ]4 Z - with the database. Additionally, you will need a vendor library installed on the
- u, r. u/ P- ] - local machine, this came with my MySQL install.* V* G/ U+ r. S0 F
- These instructions will not tell you how you might transfer your data from the9 n' p. T5 u* A0 ^6 K/ `! w; s ?
- SQLite database to the MySQL database, we start with a clean and empty MySQL
0 c$ `( {+ L0 F, i9 Q - database.
- P& _" o) K) Q# P) }! ] - Some users have reported ways to import a SQLite database into MySQL, but at5 L# j( G1 K1 f, V9 e! Q# c
- the time of writing, there are still too many issues - check the current status
. r& {& J! {( h m* |+ ] - in the TeamSpeak forums if you are interested.
$ c6 L! \ d; f3 r2 c; M S - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 U; y( x" A1 h
- Borland was used. This driver can only interface with the client library that
) G* r+ d. E$ \. s5 W - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 n1 D! f3 T9 B# u, O% ~4 u - client library - basically all you have to do is to use a 3.x client library as
, v8 H" U0 D4 y; f! f) v' p$ K - "VendorLib" and a 4.x database to connect to.
6 a! ^$ O) ?0 r, [. ` - If you need more info about dbExpress, you can contact Borland.
8 G; b' c2 ?9 O! J. B
r' u3 e L/ e9 D1 R% O/ T- ### Doing the work ###
/ f: H% u0 c9 i6 X - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# l! y' u% K) I/ R# v7 H6 w" ~: D - the perquisites right, just open your server.ini file, and add this section at
! h8 m g: y. Z5 O" A2 _8 w - the end:
! A6 i3 o# i- w& R7 \ - ---cut here---' S+ B$ u) I' W6 T
- [DBEXPRESS]
5 X3 h1 j/ O2 k0 G: y. J - sqldir=mysql_sql5 g" N) U! x; o! o/ i1 k" K
- Drivername=mysql, f' o, {7 R, [" j' h- l
- Database=Your_Database_Name_Here
7 J/ S: V% F7 i# C" |" H - Hostname=The_PC_the_MySQL-Server_is_on0 u; }% a/ ]* G+ z. X
- User_name=User_name_on_the_MySQL-Server
! ?+ ~2 g- x* S - Password=Password_to_go_with_above_user_name
' C5 {, g& X! _) v5 F1 b - GetDriverFunc=getSQLDriverMYSQL- b% d% {- E, v7 r
- VendorLib=path_pointing_at_your_mysql_vendor_lib
, c; `! [* e+ a) ?/ X% [( t$ @$ P - LibraryName=path_to_libsqlmy_libary- D; ]7 f- u4 N" m* f% Q- r
- Active=1
4 Q) Q' Z& @2 z% E( t - ---cut here---& l. [; m9 ]. ^3 p" V# ~
- In my environment (a linux box with a MySQL server running locally) I have:
1 Z$ u! _$ j- d* A9 ^ - ---example---
# t0 p/ N2 ]2 O; D- y - [DBEXPRESS]- i2 ]6 M# d+ G D
- sqldir=mysql_sql
1 X4 \: k7 v& ~& [& I - Drivername=mysql
* f7 C7 S' P& _- G. v* B# T - Database=test3 s: z3 e! \% G6 A3 f
- Hostname=localhost6 m2 j. A4 \ r( G: J0 u
- User_name=testuser
, c5 ~9 ?9 A8 P& R9 M9 J - Password=my_password
1 {0 x! a8 o9 T8 ^2 u - GetDriverFunc=getSQLDriverMYSQL
4 ?% j# O" z; e/ C0 ~9 O - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( _1 A7 z0 U9 W7 R/ S - LibraryName=./libsqlmy.so$ N" Y v- c" h3 D+ n7 ~, i
- Active=1
/ p! |/ `6 B* r& q. d" f3 l+ ^4 z - ---example---
- K% V2 c6 F t6 @$ T8 g
3 a& L0 I( D$ |% m2 [" m$ w0 \' e- On a windows box, also running the MySQL server locally, it would be:" h; Z/ D5 h/ l x
- ---example---! C4 G1 I( s4 D- J1 G8 N
- [DBEXPRESS]) N4 `/ g: b* B* j
- sqldir=mysql_sql
& _% P( w6 W: V* V) @! k# ~ - Drivername=mysql
* [2 U. C$ c. W - Database=test' h5 E2 I9 S' [0 ]8 ?& R& J6 q
- Hostname=127.0.0.1
% z3 m; E. L- {+ [0 y; ?" K - User_name=testuser
y3 ^5 |4 i9 p4 X1 d7 e - Password=my_password
9 {, t8 ~3 e \8 p) q3 z - GetDriverFunc=getSQLDriverMYSQL4 l7 m' {1 M# m5 i4 z
- VendorLib=libmysql.dll [9 R8 e+ x) u I5 w
- LibraryName=dbexpmysql.dll
% |6 T! ?( S3 N - Active=14 Z+ m4 x r* t! |( o
- ---example----% L% P8 \- a1 U( L5 a! B4 r
- - written 02.03.04 by pwk.linuxfan
2 l, ~4 S8 u- a+ r, [- ?( f/ k
6 B8 [$ q' l; ~+ f: Y. C: l1 Y
复制代码 |
|