|
|
麻烦翻译一下,下面这段文章:xhan
, N( b& K! H5 `! u9 t- L2 E
7 v/ U, H: i9 ^) s$ Y. t- 5 K+ q# I7 `/ P- g
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& v0 B+ T, F9 m
" N5 N! D0 v6 [6 [: _' d$ _- ### What we need ###
8 U& m( E. X; y* O: h% A* R - Naturally, we will need a MySQL server to store the data for us, this document 6 ~) x1 ?/ o9 l5 \3 A& y
- will not explain how this can be done - there are documents out there for the
6 G: |- ^; S1 a, ]7 N- { - interested. The requirements include a (empty) database for TeamSpeak to use
+ I% l" v: Y, m/ q' W, @6 |# m - and a user account (username + password) that has the permissions to do stuff3 q+ U# ]( k6 w9 R" t/ i0 w) o5 G3 T: ]
- with the database. Additionally, you will need a vendor library installed on the1 S1 @" M" \$ s6 `$ p+ Z4 F
- local machine, this came with my MySQL install. F$ c: x1 b1 A$ g
- These instructions will not tell you how you might transfer your data from the
. l! a7 W0 w" m" f3 h) C8 E* D# V - SQLite database to the MySQL database, we start with a clean and empty MySQL
m) U1 y2 L, F: K - database.6 i9 y$ F- z1 G6 W! h3 Z5 O& K
- Some users have reported ways to import a SQLite database into MySQL, but at
+ X& Q# ?+ W6 ^. Q, ^2 P - the time of writing, there are still too many issues - check the current status8 K. j# K% b) y
- in the TeamSpeak forums if you are interested.
+ @) w) f$ N/ M. O v3 I - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ R, M' `+ r' q# [0 j- J
- Borland was used. This driver can only interface with the client library that
( w. h/ ]& K, B/ V' X* [ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( _+ e$ m" J( l; v( b8 X4 h' ` - client library - basically all you have to do is to use a 3.x client library as
( d, f0 S$ U+ U# l# b1 h o3 r: ?. | - "VendorLib" and a 4.x database to connect to.- S' c! r0 y# K" e
- If you need more info about dbExpress, you can contact Borland.
" ^! K" R# K5 B1 _4 Y$ {: y - 2 u4 s/ L& [* Z6 B5 M$ N
- ### Doing the work ###
1 z5 g, Z. }, b- y# W2 U* b - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- z$ d% k1 I6 N5 H* c5 \9 U% _
- the perquisites right, just open your server.ini file, and add this section at" J( J. }% T% t5 s5 [4 B
- the end:! y# ?! y/ f. x, k8 v/ @ c* ]
- ---cut here---) a9 _ q' s& U/ K' U! p0 K! t
- [DBEXPRESS]4 a3 t7 {" S& j. [9 t
- sqldir=mysql_sql/ t: Z; D/ {4 Z$ n( O
- Drivername=mysql
8 c( Y1 U/ g; U' G, @: Q# @ - Database=Your_Database_Name_Here
: z; l" t$ r. ]* r - Hostname=The_PC_the_MySQL-Server_is_on& p/ B2 ?1 F( I" r) [5 z8 D( g4 K' O o
- User_name=User_name_on_the_MySQL-Server
: |2 x3 N+ _- a+ f" ^7 ~" @- E - Password=Password_to_go_with_above_user_name
* Z$ e6 _5 R2 T - GetDriverFunc=getSQLDriverMYSQL" l" B1 y$ n$ X. Z( c
- VendorLib=path_pointing_at_your_mysql_vendor_lib2 U+ E% ~2 R' _" p6 s& ]: `
- LibraryName=path_to_libsqlmy_libary: E0 ]. ?5 K0 T( L+ k4 R
- Active=10 N: a/ l) v. _
- ---cut here---- r! T4 t; Y) ~4 O; U
- In my environment (a linux box with a MySQL server running locally) I have:
$ B* Y2 v) |3 M( J6 m - ---example---
2 g% r. H: v% ]( G: } - [DBEXPRESS]
d1 T+ X. K/ O3 K: s - sqldir=mysql_sql4 I1 Z* j9 a3 M7 L+ {
- Drivername=mysql8 W, r( W/ g6 ~9 h& e+ p( f4 E
- Database=test5 Y6 v. k6 ]% x( Y5 [) [6 K
- Hostname=localhost
& V2 [) R' w6 I - User_name=testuser
( Z$ j" |6 U0 v+ \ - Password=my_password
/ h. F; R# t! ]1 F' Q, \ - GetDriverFunc=getSQLDriverMYSQL8 D1 J0 ~" c* ?& r& @/ d0 b
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ i5 ~! z/ E* `( G
- LibraryName=./libsqlmy.so p. X4 }" v+ N) U" ?# ]
- Active=1
3 x2 G. q4 ~% q, i. U" h9 Y% R - ---example---- S, V2 P3 x, I9 U8 a" C
7 b* N0 P* `5 I' `: C1 S0 }1 z- On a windows box, also running the MySQL server locally, it would be:
/ O' l1 e2 }5 u5 J! M: s - ---example---- M3 o0 v/ }2 Z: v8 c
- [DBEXPRESS]
9 C; F& M- K0 u" P" G - sqldir=mysql_sql% ~2 {# w% v" y
- Drivername=mysql. w* g# i) l9 L
- Database=test2 v0 ~( T+ {1 g7 D0 r. U
- Hostname=127.0.0.1
4 ? \# J8 h/ ^+ w - User_name=testuser9 Z. D+ y/ c$ L$ I" L" d
- Password=my_password1 _ A! D$ W! j" m% R
- GetDriverFunc=getSQLDriverMYSQL; R' K- n9 s; f5 t
- VendorLib=libmysql.dll% g, z; F9 w4 u2 r: h* J; |6 S0 q
- LibraryName=dbexpmysql.dll
3 \1 [, w+ l4 _. K! |/ O2 \ - Active=1
% P! w0 F3 M' Z% X - ---example----& }+ Q* ^' t$ }" E/ L1 Z
- - written 02.03.04 by pwk.linuxfan# z& C G; _$ u% E" J
6 p" }. E S, k- `- r% s
复制代码 |
|