|
|
麻烦翻译一下,下面这段文章:xhan
% {# ]6 G% b, G2 x, |! Z) a( U
4 ]# s. l9 s0 @8 l/ T- 2 O5 K5 z' s( n: k
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 O* [" l! K% R- L4 h" U! g
- . H6 e2 _3 e& d+ s A
- ### What we need ###
" `) I$ G1 l1 z1 P' }0 D7 x& m - Naturally, we will need a MySQL server to store the data for us, this document # f* A# I) {" x/ ]
- will not explain how this can be done - there are documents out there for the / D( T* F5 c) q1 H& D! p" t
- interested. The requirements include a (empty) database for TeamSpeak to use% v! p3 `; @6 a& Y' y( \, @ U; t
- and a user account (username + password) that has the permissions to do stuff5 {, s4 i I1 f' u. ]! r
- with the database. Additionally, you will need a vendor library installed on the0 @( n0 m1 _& n+ s7 k$ t7 G# t
- local machine, this came with my MySQL install.
3 B2 h; C% {" `2 X - These instructions will not tell you how you might transfer your data from the- x. m) R5 r& |+ ~+ w) H
- SQLite database to the MySQL database, we start with a clean and empty MySQL$ @! C! {. d* A* z8 J
- database.
# j, G! C* O+ p n* c3 |# @) ? - Some users have reported ways to import a SQLite database into MySQL, but at! W$ b3 k; r- \1 j- s2 O7 P& @" X
- the time of writing, there are still too many issues - check the current status6 M# _, S1 e3 A; n$ Z
- in the TeamSpeak forums if you are interested.: v2 v8 U9 G; L p6 W- r$ T
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& h- d0 [9 p1 J# A/ T; k0 \2 `
- Borland was used. This driver can only interface with the client library that
0 U( k0 G4 j3 y7 U- \8 E - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 e% W# H6 x0 z. x" B( `0 w
- client library - basically all you have to do is to use a 3.x client library as
) o x$ v5 ]6 K4 d; {( o' m - "VendorLib" and a 4.x database to connect to.0 U( }+ E0 Y# f1 Q' O/ J* i
- If you need more info about dbExpress, you can contact Borland.
6 `* n ^* ^! Z1 `
/ p- O% n7 b- ~$ n- \- ### Doing the work ###/ ~4 J) F" T1 P9 j f$ q3 M# U, ^! z
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 P9 }4 P# j/ p$ g1 L
- the perquisites right, just open your server.ini file, and add this section at2 I4 ]; ^6 e0 x: \
- the end:! |" [5 o; _9 [8 ]: E
- ---cut here---$ n: @* j8 U) ?( I. j5 R0 }
- [DBEXPRESS]& H3 q; H6 }: e% A- M; {
- sqldir=mysql_sql3 W2 c" S! E8 L# X5 a* f* v4 t
- Drivername=mysql( ~/ K8 w. s- W S
- Database=Your_Database_Name_Here) y/ W8 c: t9 T- _8 H0 k: _
- Hostname=The_PC_the_MySQL-Server_is_on' R2 ~# x: _; `+ }
- User_name=User_name_on_the_MySQL-Server
3 y8 |" a4 [" B( i5 [& R! V - Password=Password_to_go_with_above_user_name- H1 n# H, V. h7 C+ e
- GetDriverFunc=getSQLDriverMYSQL% d# K9 e+ J+ ^; V- H
- VendorLib=path_pointing_at_your_mysql_vendor_lib! K8 ]) T% A. w) Q3 M& \. W/ J
- LibraryName=path_to_libsqlmy_libary; |' ^9 ?8 B$ X0 J1 b! _
- Active=1; f+ }; S" O8 N
- ---cut here---
, J9 U' h0 B2 [( H7 q1 p - In my environment (a linux box with a MySQL server running locally) I have:
$ N! X, A3 i( b" N+ u - ---example---* l0 z3 f8 X& y0 j. ?# Y* @
- [DBEXPRESS]
; |) j& K0 [9 `% C7 K# c - sqldir=mysql_sql
- k- b, l/ O [# v B - Drivername=mysql' ] `$ [) p/ `: \& ?
- Database=test
6 H F' T1 n% r X% f - Hostname=localhost, o: {* _6 S6 p2 N- k1 o* T9 B
- User_name=testuser
$ {( ^, u. w, P7 K' _ - Password=my_password
/ B4 C0 B7 n4 @% D$ V: E; X2 d - GetDriverFunc=getSQLDriverMYSQL
8 G7 o: E0 [9 A. T& w4 l - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: g0 M. O E- O, K4 N5 e4 R' D - LibraryName=./libsqlmy.so5 u' w) ~$ z* o! r) o7 M
- Active=1
3 F1 I7 [, n5 m- y6 X& O. I5 X - ---example---
" p0 n0 r9 T- f6 H - 8 L3 Y3 \6 R- U+ s! k1 u% Z
- On a windows box, also running the MySQL server locally, it would be:% ?5 \$ ]& S% a$ s; A+ T: k
- ---example---2 i+ d- v3 R q& P/ w0 F7 f
- [DBEXPRESS]
' S1 t0 w7 a) T6 L# Y3 j. V# H - sqldir=mysql_sql
- F$ I* h& @0 v# @% \ - Drivername=mysql
+ f$ F5 r* }" d$ e8 ^( ] - Database=test
4 G0 K* Q0 [: |) p3 ?* @ - Hostname=127.0.0.1
: k- c3 {# A/ V: b" }* `$ l% M - User_name=testuser( q1 T4 }$ h9 f# V m
- Password=my_password
5 x) A4 g8 _4 ~- P - GetDriverFunc=getSQLDriverMYSQL
$ ^/ K# y, A) v - VendorLib=libmysql.dll2 p% ?) X7 f+ d
- LibraryName=dbexpmysql.dll
: z1 \/ [8 l1 K - Active=1
3 z8 u: E" ^9 [ - ---example----$ v+ N9 S' @1 I0 a" i
- - written 02.03.04 by pwk.linuxfan: q- ^+ F0 K* t4 Q- E- V8 `
; s& v+ r2 g# N5 P
复制代码 |
|