|
|
麻烦翻译一下,下面这段文章:xhan
2 m* x' ~# a! m' W! E% \: E9 I
4 E- K0 w( P9 {* H- ; D# q# P* B0 I) a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: O; |# m7 U# o' a - * m1 W8 K6 ^& E: M7 t
- ### What we need ###! E) Z' g% R4 m
- Naturally, we will need a MySQL server to store the data for us, this document ) b4 Z" v: e, E) L0 e7 B# ^
- will not explain how this can be done - there are documents out there for the
# ^! A7 u' j$ _$ g4 k - interested. The requirements include a (empty) database for TeamSpeak to use
4 n8 N( p* n8 j/ C! Z0 p/ G3 ~9 q - and a user account (username + password) that has the permissions to do stuff, O# S+ E; p$ ]! \+ n. d. S# D4 u
- with the database. Additionally, you will need a vendor library installed on the: g+ n5 a% ?$ U; Y4 c2 \
- local machine, this came with my MySQL install.
$ Z5 J; q% y1 K$ Z7 b - These instructions will not tell you how you might transfer your data from the
0 U- X- d! M6 L% I- O3 i0 y - SQLite database to the MySQL database, we start with a clean and empty MySQL' X0 E6 s' U( C$ V% z
- database.* ]% l6 c; s- @: n1 r V5 K# F' e; ]
- Some users have reported ways to import a SQLite database into MySQL, but at- I" B3 R9 L6 l H) K
- the time of writing, there are still too many issues - check the current status" d7 O8 N e" l: Z0 D: T8 C
- in the TeamSpeak forums if you are interested.1 z' z7 ?' y$ K
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; B4 a6 P0 F2 c. i" {+ J
- Borland was used. This driver can only interface with the client library that
7 d) s& |! S ?# ?: Z- J1 q - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
) R; O4 [# j$ k# U0 x2 r- X2 W - client library - basically all you have to do is to use a 3.x client library as
( o, X" S& Y! G3 y4 h" Z7 c - "VendorLib" and a 4.x database to connect to.
( {; \% w% V s N - If you need more info about dbExpress, you can contact Borland.
4 ]" s' J, m. B; h* p0 R$ R
6 B8 n2 Z/ u+ Y; u: ^+ h* W5 O- ### Doing the work ###
, j5 K+ u4 @% z: `9 L - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 A O2 X% ~+ P1 d
- the perquisites right, just open your server.ini file, and add this section at5 A( q8 W' ~7 u
- the end:
* Y. J$ b( Y: i B% s8 X B6 T/ j- O - ---cut here---
) z" ]6 K2 @3 A" `+ R# J' M - [DBEXPRESS]
; @, ?. z# N& c - sqldir=mysql_sql/ ]+ }" b% d6 g. \
- Drivername=mysql
9 S1 ~) s+ c; @" d - Database=Your_Database_Name_Here @! K3 i3 @0 D; e2 y
- Hostname=The_PC_the_MySQL-Server_is_on
/ p0 y9 k9 {. @1 w, B - User_name=User_name_on_the_MySQL-Server
. Z" G, b$ \: q% m+ y' n# V8 C( ^ - Password=Password_to_go_with_above_user_name1 f2 K3 {& m- b/ ~3 M4 I! k( Y# L m+ p
- GetDriverFunc=getSQLDriverMYSQL: F9 t. q) c: w) ~+ ?% C
- VendorLib=path_pointing_at_your_mysql_vendor_lib
4 g# ~; d/ P) z' B+ G - LibraryName=path_to_libsqlmy_libary8 `4 K: Q8 B: J
- Active=10 S+ _3 V5 i; f2 ?% B" u$ r
- ---cut here---/ p) l$ p( k8 k, U& N6 Z! \
- In my environment (a linux box with a MySQL server running locally) I have:/ ?. }9 j% J/ d( [
- ---example---
8 |7 a% P$ H+ y1 _& k9 n% @. W - [DBEXPRESS]2 P. p. n( v5 K$ |
- sqldir=mysql_sql; n2 k/ v4 z6 B% `+ Q
- Drivername=mysql
( r9 N$ T$ ]. @; D - Database=test
. k+ f6 d" y- {) }; Z9 o - Hostname=localhost' }2 y: s0 p1 |) p; C* p
- User_name=testuser
" v- J5 p; V) W, D$ q6 a - Password=my_password
! r3 o1 K1 S! {( Y, t0 W5 M - GetDriverFunc=getSQLDriverMYSQL" X$ B- p2 Y% Z7 ?+ L0 \% R
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 v+ `3 ^0 i( ]9 y8 C7 w: Z) w. U - LibraryName=./libsqlmy.so5 \9 P% X0 {7 d5 K
- Active=11 `0 p' P7 w# g# E
- ---example---
1 o% f; n) q! t7 e
$ Y+ ]( `. Y/ U" V) j- On a windows box, also running the MySQL server locally, it would be:% ~: }* z+ t s% e
- ---example--- z- e& i' c- z
- [DBEXPRESS]
n2 w1 l9 F: C6 r - sqldir=mysql_sql
! |( W, W& ~# q3 |) e - Drivername=mysql
& s* X$ n0 H. U: F - Database=test/ I6 r1 U+ p: _ Y
- Hostname=127.0.0.1
9 M4 }4 A8 v( ]/ Y - User_name=testuser
" ?% {. O' @# p6 T - Password=my_password2 P$ L( X2 \- E0 S& y+ O: v) O
- GetDriverFunc=getSQLDriverMYSQL& I% r! e2 U9 L5 g. t# j9 Y4 f9 ?
- VendorLib=libmysql.dll" m! ]4 T% t+ C0 a
- LibraryName=dbexpmysql.dll: v" ^3 O) w. d- w
- Active=11 ^8 B$ t% A D; x- g l$ ?
- ---example----" P0 \3 y3 s3 F
- - written 02.03.04 by pwk.linuxfan8 Q2 R, r/ M7 k
3 K. g# l0 A3 [ M
复制代码 |
|