|
|
麻烦翻译一下,下面这段文章:xhan 3 b! W, [# S' {$ Q p
6 Y3 j# G$ t" {-
7 r$ T& |% g4 } - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ \$ {2 ^; ]' ?9 ~
* b, r1 x- [, p; W1 i/ }% m. T- ### What we need ###( [& _9 W$ \3 [5 F
- Naturally, we will need a MySQL server to store the data for us, this document # a) n8 g. C( ^ y; J3 L6 y$ W
- will not explain how this can be done - there are documents out there for the . S' Z( n9 Q+ X5 a
- interested. The requirements include a (empty) database for TeamSpeak to use
# \ D5 X) E7 [/ {" l - and a user account (username + password) that has the permissions to do stuff
6 i/ X, ^/ F( b/ {2 l% ? - with the database. Additionally, you will need a vendor library installed on the0 u- W8 w/ a/ R( O/ a
- local machine, this came with my MySQL install.6 G$ d; t% Q: o0 X, }8 F/ `
- These instructions will not tell you how you might transfer your data from the
# N& u/ o6 `: r; Q/ Z5 u- z - SQLite database to the MySQL database, we start with a clean and empty MySQL
9 r) A1 _$ ], ~* J - database.
2 Z# Z" K. D: A4 `6 I6 g' N( d8 @) B - Some users have reported ways to import a SQLite database into MySQL, but at
( }. u4 K/ ~5 {- H1 S7 I - the time of writing, there are still too many issues - check the current status( Y3 k( W# V' X3 C# [/ ^+ ?
- in the TeamSpeak forums if you are interested.7 B6 d1 {6 |# X, }' ?! ?! }
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
1 I5 W- G9 z- T) a. U0 C( K - Borland was used. This driver can only interface with the client library that 8 Q" Z q( C, b+ U9 H7 l7 x7 w' }: f
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ v u: j8 d" n9 w# N q/ B8 n1 b - client library - basically all you have to do is to use a 3.x client library as
; r5 Z5 r) r8 h+ _ - "VendorLib" and a 4.x database to connect to.
3 C, R) @0 F1 o - If you need more info about dbExpress, you can contact Borland.! C: o& i; l) P% Y9 A( R
- 3 a; M/ e9 m; x
- ### Doing the work ###
- c1 i5 T. `* w H* y - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
/ X9 ], i$ r6 Z' g0 e6 Q - the perquisites right, just open your server.ini file, and add this section at" g- N. U9 U, r, m
- the end:
$ F" n$ g7 C. A! y - ---cut here---; D3 Y4 F8 p! ^$ p' T, V5 [$ Q
- [DBEXPRESS]
# d W1 P) R, [5 a+ d* R2 i - sqldir=mysql_sql
) d2 N& N2 V; ]. F- }: J8 X - Drivername=mysql5 t/ r1 \0 g- W7 S+ C6 D/ A& Z
- Database=Your_Database_Name_Here
/ _9 B. f+ {, n5 R7 l+ F) d8 F - Hostname=The_PC_the_MySQL-Server_is_on' x' U- h# V6 W- T1 ~0 Z: J
- User_name=User_name_on_the_MySQL-Server
9 ?3 m2 \# l& {- F9 O3 \2 ] - Password=Password_to_go_with_above_user_name* I# @' V `2 F2 w' Q& Q
- GetDriverFunc=getSQLDriverMYSQL& I/ i( d: M: ^3 a5 p
- VendorLib=path_pointing_at_your_mysql_vendor_lib
) ]( F: o7 X* S( W - LibraryName=path_to_libsqlmy_libary
8 c) X& T" A! p, r# ?3 c: n - Active=1$ x2 R" w) P1 y
- ---cut here---3 s% ?; V0 a4 c3 l- R% f4 E) i
- In my environment (a linux box with a MySQL server running locally) I have: r: Z& Y2 g" n& E( r. K, M
- ---example---
' g8 m3 r+ h4 Q4 q6 q - [DBEXPRESS]- s9 l4 e4 G0 F$ t9 O2 z% A- _' ~
- sqldir=mysql_sql7 L& d$ s4 w* Z. y K
- Drivername=mysql1 ~4 P# C7 y! [, E
- Database=test
& v" Z" F, U( L - Hostname=localhost+ E+ q+ [/ H" K" f: r& O4 r
- User_name=testuser
. |! u( c l7 y' a - Password=my_password
1 F9 c8 V3 r g# e4 K% _' O - GetDriverFunc=getSQLDriverMYSQL
" N9 u F" g' k& |# r - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; |- \3 S+ E% m4 l$ ^! e - LibraryName=./libsqlmy.so e7 G) x/ G2 a
- Active=1
; z! i/ J5 B1 M. y- k7 { - ---example---
' y3 `6 E4 H" _0 O0 o) l& u( f$ s
7 L6 D! H, G3 o, W( i- On a windows box, also running the MySQL server locally, it would be:+ X& \1 I. `# W
- ---example---
6 w- o( q/ N+ ^6 X8 W! i1 {4 d# Q# | - [DBEXPRESS]: h# P8 I7 S: [& z# ]- [
- sqldir=mysql_sql
( L0 c- l- g6 K U; `8 e# U4 c - Drivername=mysql# o2 x0 Q) B7 e3 D: ?- I
- Database=test
; A0 ] f* V( E" a. l3 t' M - Hostname=127.0.0.1' S2 d! ~: v4 Q! s" x+ G$ p' N' C
- User_name=testuser" R3 Y' X1 h! T* W
- Password=my_password j k" u% p3 e' U
- GetDriverFunc=getSQLDriverMYSQL
2 I3 D( |# I; W- j - VendorLib=libmysql.dll
, ^2 {1 A( Z) ~9 M - LibraryName=dbexpmysql.dll
* m3 O2 ]2 Y6 K+ ?2 y; q1 M' _9 M - Active=1
& w: p; w5 G$ g6 Z6 g4 { - ---example----
6 L2 K. d/ e. t7 H( {6 g) s: E; P - - written 02.03.04 by pwk.linuxfan- a! d( d. @( u$ U7 }
8 A) p! ~ h5 b/ i3 w7 L
复制代码 |
|