|
|
麻烦翻译一下,下面这段文章:xhan : u a. J. L( Z% B$ H3 i- b1 a
+ D/ P( f7 b H" x8 B* ?, O
-
1 a- Q( Z. s0 N' y& H8 R2 O - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 [9 h) [6 Q7 L7 X. m. {
$ w2 F- H; R1 s2 c) @* x0 a- ### What we need ###% F4 v. q8 ^7 {: y3 k. |3 Z% J
- Naturally, we will need a MySQL server to store the data for us, this document 1 }$ g! [! @& P5 L
- will not explain how this can be done - there are documents out there for the 9 V; z" L+ j0 C( @; X- d
- interested. The requirements include a (empty) database for TeamSpeak to use
+ L6 d! f- r, M0 f7 w - and a user account (username + password) that has the permissions to do stuff
9 A# L3 b# p2 ^" g: L1 I( G - with the database. Additionally, you will need a vendor library installed on the
9 ]# ]3 w# L h; K7 @ - local machine, this came with my MySQL install.
: k b, b) G- @) w* h9 x8 Q- Z - These instructions will not tell you how you might transfer your data from the4 L" S) Y% U0 n9 Q! J' ~1 K' _
- SQLite database to the MySQL database, we start with a clean and empty MySQL1 |3 c- Q. L6 ~& h/ m
- database.0 x' b5 p+ a! N7 E' \4 V
- Some users have reported ways to import a SQLite database into MySQL, but at, c* |2 \: w- H4 [% n- n) I$ F$ N& I
- the time of writing, there are still too many issues - check the current status! ~1 g0 u0 H3 P# d7 T4 M2 _1 f
- in the TeamSpeak forums if you are interested.4 |& [' P! Z8 _3 \6 }/ p( s
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# f+ y( g* y; i! q
- Borland was used. This driver can only interface with the client library that
1 A/ C9 v8 G6 p# N- P* \ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
! j9 o1 B' m6 e! t& { - client library - basically all you have to do is to use a 3.x client library as # b( F. C% D T. l0 A- h d
- "VendorLib" and a 4.x database to connect to.
0 T% j& z. @# n( \; K - If you need more info about dbExpress, you can contact Borland.: w1 g6 D2 p$ I
' x/ {9 Z. }+ W8 g3 t9 }- ### Doing the work ###
) d3 |0 X4 U3 H1 j - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all% a$ e( s$ j, w: C
- the perquisites right, just open your server.ini file, and add this section at6 s! |0 \4 t. m. i6 J
- the end:! y( _$ t) C$ M7 T4 k5 w, F: ]
- ---cut here---
* t7 q9 d; X+ K, @7 [ - [DBEXPRESS]5 [5 c2 D3 A/ e( j
- sqldir=mysql_sql
3 x6 s; d$ W& z$ F& ~' X- h/ j+ }. w - Drivername=mysql. `6 C! u8 k. f4 ]
- Database=Your_Database_Name_Here
( E' ^) w2 J3 e - Hostname=The_PC_the_MySQL-Server_is_on
' d8 i# P$ @, \2 v* F. M - User_name=User_name_on_the_MySQL-Server: g+ b" u! q, L& i
- Password=Password_to_go_with_above_user_name
' ?4 v, u4 U* V' u. P+ { - GetDriverFunc=getSQLDriverMYSQL. S5 Y- E2 O# M6 v1 K* }
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. R4 J! B% G9 l# J" r( D7 D - LibraryName=path_to_libsqlmy_libary
0 q( i: T. f) f0 h7 S$ Q - Active=17 w2 U2 h3 X: `- w! u
- ---cut here---7 w5 [3 i( O I! s$ _! @9 P4 \+ M
- In my environment (a linux box with a MySQL server running locally) I have:( d6 I1 t" w. W' N
- ---example---" Z; z- P, i) i- K6 J
- [DBEXPRESS]) P$ |4 t+ B# h6 W' n
- sqldir=mysql_sql
; o* v y9 ?- @/ D: A( q; K - Drivername=mysql1 Q1 [0 H# ^& \
- Database=test+ X/ |" J+ t2 u! {, e- `6 j
- Hostname=localhost6 R+ o" F% R% L' z
- User_name=testuser4 u# K% F2 u0 v' g8 G0 t6 m
- Password=my_password; d2 J3 Y* W x) V
- GetDriverFunc=getSQLDriverMYSQL
. R( Y5 u0 @# J2 P0 J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 n& ~ ]" g7 F - LibraryName=./libsqlmy.so- ]- E2 T8 S1 q8 F1 a1 _( ~
- Active=1
" Z! _5 A/ n0 X: j- v( T# l - ---example---
9 z* j; L( D) P
3 X" ^! z/ r+ |6 y- On a windows box, also running the MySQL server locally, it would be:, @3 M+ N% g. C1 K$ ]2 j+ v3 t4 ~' t+ k
- ---example---! ]" ~6 ^; L# C! e* o0 R8 O. w
- [DBEXPRESS]: x1 W3 A1 k( G
- sqldir=mysql_sql. x8 o" R1 x6 {7 W6 T! p% n. [) E& n9 l
- Drivername=mysql. F' t# @- l( p) j$ Y, E- X
- Database=test8 H6 p7 [( ~$ U2 I9 L) O4 D; C* R& I
- Hostname=127.0.0.1
/ v, n6 J+ f! T# r - User_name=testuser
! O |/ T# t3 a3 }4 E! G7 t. c( D - Password=my_password2 t" G8 d$ j, ]% `6 B: Z# N2 u: d
- GetDriverFunc=getSQLDriverMYSQL) u8 @; m+ }" a7 |3 e
- VendorLib=libmysql.dll/ D) B8 X g5 h4 e) M0 f2 N
- LibraryName=dbexpmysql.dll
# _1 v/ q% ^6 D/ q; h9 q - Active=1! V( E0 B2 Z1 i) f: I6 U5 V
- ---example----5 ]0 u' v. B$ [
- - written 02.03.04 by pwk.linuxfan
' O5 y- P& r9 u0 |4 s - 2 T$ b: p/ _2 }$ {8 U
复制代码 |
|