|
|
麻烦翻译一下,下面这段文章:xhan
; }7 L9 L; ?. |1 X
- _: U9 R. [+ f" u6 H3 S% U- " z1 ^) W8 ]: m! b0 t6 B
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 b% _, F0 e! I& A1 U# d - & p2 N3 @9 t8 K9 y* B+ A
- ### What we need ###
c* R$ F* j+ y/ A7 H& P! t( ^ - Naturally, we will need a MySQL server to store the data for us, this document
k, k$ [4 t8 |& [* A) E - will not explain how this can be done - there are documents out there for the 8 o* u2 S* c% @% S, N& @7 P7 M
- interested. The requirements include a (empty) database for TeamSpeak to use
. O" S! I2 h& a - and a user account (username + password) that has the permissions to do stuff
4 k" o" u. D9 z" P - with the database. Additionally, you will need a vendor library installed on the/ |3 `2 r2 V2 p3 i) u6 r5 x
- local machine, this came with my MySQL install.
" L( {9 @: G! F% @) h4 w o, k - These instructions will not tell you how you might transfer your data from the) }' h0 y& A5 j
- SQLite database to the MySQL database, we start with a clean and empty MySQL
; I4 u4 v+ f, j& B9 X- m - database.
% w0 d+ ` h. N" w, `; F - Some users have reported ways to import a SQLite database into MySQL, but at
9 f& }! G( o7 o; \: x - the time of writing, there are still too many issues - check the current status
# g8 V" P0 C/ n8 c( ]' l9 ? - in the TeamSpeak forums if you are interested.2 @5 F0 n4 g7 {8 _
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
' E- ^, V6 P3 [. a8 u% b - Borland was used. This driver can only interface with the client library that
% l/ Q" v0 l3 R. k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
i% p B6 u. g5 H: s" { - client library - basically all you have to do is to use a 3.x client library as ! B5 W5 y! c" w2 |
- "VendorLib" and a 4.x database to connect to.
3 W: N6 w( q5 ?0 l- g. M- N- s* h - If you need more info about dbExpress, you can contact Borland.
) O& f6 j w0 v* S
; N q* k7 {; j- ### Doing the work ###% Y1 K( Z! ? i P
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- n- L/ c- Q9 s! T
- the perquisites right, just open your server.ini file, and add this section at
) h- o5 G) c/ [) K6 Z8 v% \ - the end:
* o7 P1 p" x- t% `; { - ---cut here---
. C' {4 ~+ B7 o - [DBEXPRESS]1 d. I I5 q& N5 ?6 }. L
- sqldir=mysql_sql0 R# F( S, h6 n) P
- Drivername=mysql
: J: d9 O( |# l" y! J) e: T1 P: y8 N - Database=Your_Database_Name_Here f$ _; [0 W5 P. D- u N; H6 n
- Hostname=The_PC_the_MySQL-Server_is_on
; @& q6 a B' R - User_name=User_name_on_the_MySQL-Server
' ?; @+ P8 F: }0 ~' @1 E& N. q/ K. ~ - Password=Password_to_go_with_above_user_name
+ D/ s/ l! Q6 a$ Y - GetDriverFunc=getSQLDriverMYSQL
$ m% h5 `+ j1 d- ^% S - VendorLib=path_pointing_at_your_mysql_vendor_lib
/ W' b9 n- P! R5 |' _' \* L - LibraryName=path_to_libsqlmy_libary! T) I. f+ } P3 B* v
- Active=1
7 ?1 F) m" k$ Y- @* X) F+ L - ---cut here---( n: o5 _7 Y2 v( O
- In my environment (a linux box with a MySQL server running locally) I have:$ i1 U9 e0 G [" m
- ---example---
: z( x* ^ i, O* }) m! k - [DBEXPRESS]
! k: v# F. Z! D# K8 w4 a' [, ` - sqldir=mysql_sql
8 i, b) h( h- S! r) P( @ - Drivername=mysql- p8 C2 V: F8 m3 }4 l# [
- Database=test
, {% ]+ V& N8 H - Hostname=localhost' R6 G: W5 ?3 w" M9 z
- User_name=testuser( m; A; z) F& F* `9 Z# O# t; R
- Password=my_password
9 o" `* y: F3 T0 c; T - GetDriverFunc=getSQLDriverMYSQL; X+ i Q. M; M/ m
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
8 g; V! [7 a$ h: w. s; m) s - LibraryName=./libsqlmy.so! N/ L" `; l, D7 d2 t2 D
- Active=1
9 i9 E3 N. s/ _- r9 ~ - ---example---# T8 ^0 s9 u2 r6 }3 t
9 d) y- K9 ^* h3 }% v- On a windows box, also running the MySQL server locally, it would be:
: x+ ~; T( t" k - ---example---
% R. s( q* V9 u* C& }0 o - [DBEXPRESS]
+ u8 y0 t$ s& e% x& W - sqldir=mysql_sql
6 j: O* A2 u0 E' Z - Drivername=mysql, {: l" B" R% p% n$ h- p5 o9 c8 ]
- Database=test
) b4 Q# l. j! k5 d, W* e - Hostname=127.0.0.1
4 t: y9 u6 s, Z9 H3 e6 n' t' S$ E - User_name=testuser
( ], V6 y0 F' `7 W - Password=my_password
6 l" }+ _9 O; q( z+ l - GetDriverFunc=getSQLDriverMYSQL
# w) y$ P8 p" F4 |0 Z - VendorLib=libmysql.dll
4 E8 q% v* l" F0 [4 U% M+ P& O; B - LibraryName=dbexpmysql.dll
- v9 |: b8 Q$ H6 ]. b# k - Active=13 a6 E' s% Y: q; ~9 J
- ---example----
& t! |- G9 W* l. K# j - - written 02.03.04 by pwk.linuxfan! C; t$ @( t& b0 c N' c
7 z: D* d6 n0 [5 U; k$ f0 D& B
复制代码 |
|