|
|
麻烦翻译一下,下面这段文章:xhan
7 q$ L: P' Z1 x! u; V% h
& N: R0 O0 ^7 F! i, c# ]-
* n6 Z( L% P1 n/ q - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# Z# s: C3 D$ p" U - : N7 p! L$ T" ]0 P; R# }8 a2 ?
- ### What we need ### _9 Z1 `- k) C; c/ b6 U) ?
- Naturally, we will need a MySQL server to store the data for us, this document
1 w4 `8 g+ j: l2 y - will not explain how this can be done - there are documents out there for the 5 Z. S- s, u0 e# z
- interested. The requirements include a (empty) database for TeamSpeak to use g4 u. T* ^' u. \, s- n0 [: J/ K
- and a user account (username + password) that has the permissions to do stuff9 G# Z. t( b: O, Z
- with the database. Additionally, you will need a vendor library installed on the
, T, [5 q( w+ y/ B) s% v4 B - local machine, this came with my MySQL install.
, _& U: M6 O% D1 D+ a9 D& y6 I - These instructions will not tell you how you might transfer your data from the
6 @" {/ I- J/ y7 z4 w - SQLite database to the MySQL database, we start with a clean and empty MySQL
* J: g# O( ? f5 Y" ]* D2 r8 Y - database.3 \ U+ R3 J/ ]& _
- Some users have reported ways to import a SQLite database into MySQL, but at% B$ y% {9 [: q% g4 w( f( X
- the time of writing, there are still too many issues - check the current status
U+ a* C5 J7 A$ v' K - in the TeamSpeak forums if you are interested.$ v3 w0 B6 E: l7 n- }* `# |
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from( M! W `- U$ T6 V. B
- Borland was used. This driver can only interface with the client library that ; i$ P3 a/ \5 |; _/ D( j- O
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
& Q! M+ N. ]+ R, N# M* ? - client library - basically all you have to do is to use a 3.x client library as " m. q* t" g0 }* |" C6 F$ B
- "VendorLib" and a 4.x database to connect to.
9 H! x9 _' b1 a' J" M. i u! D - If you need more info about dbExpress, you can contact Borland.& Z% g5 C t0 G
- }; k9 T1 {6 b# J& b$ L! \0 K+ m' y- ### Doing the work ###
* r' G* o% @+ S$ }# p - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ m- y1 C% g, J4 |, P. `# b! [- \
- the perquisites right, just open your server.ini file, and add this section at6 L) `8 y5 a! q0 v& N" b3 z0 J3 ~6 m$ j
- the end:0 K8 b5 c G3 {& ^
- ---cut here--- |- h& u+ c7 V8 A6 Q! T
- [DBEXPRESS]4 P& z7 O, y+ d$ j8 ]* z" G) s, E, Q
- sqldir=mysql_sql1 d$ d" y0 O3 b0 H) n( ?
- Drivername=mysql9 X6 {% \, r% ^
- Database=Your_Database_Name_Here
. [' ?8 T9 w# O - Hostname=The_PC_the_MySQL-Server_is_on
4 X6 `/ Q- B8 n- x9 @ - User_name=User_name_on_the_MySQL-Server
3 J6 g$ s. s1 ?3 P6 { - Password=Password_to_go_with_above_user_name: A; I% m/ O- O* U+ _1 C- e: h% c
- GetDriverFunc=getSQLDriverMYSQL% I9 S' v; ~8 h: g- G
- VendorLib=path_pointing_at_your_mysql_vendor_lib
9 l: Q- C; w6 p5 [3 y4 @ - LibraryName=path_to_libsqlmy_libary4 a; G5 H( t* }- s
- Active=1
- @( I: C( A$ z3 G" |! E9 n; I - ---cut here---
* c0 P0 j4 ?* A* i# ]: o - In my environment (a linux box with a MySQL server running locally) I have:
2 f) ? p% f# V - ---example---2 J: J7 F( J, D/ T
- [DBEXPRESS]
# b' k. ?) {- @9 n! ~, t% k - sqldir=mysql_sql
' m" H7 C+ Y% Q: r/ T( Y - Drivername=mysql
5 k% u P. k- i# w - Database=test6 H+ {3 E7 x0 t8 b% O7 d! h1 |
- Hostname=localhost
& u* Z5 r! L3 E3 z5 Y3 m4 _. B9 e - User_name=testuser# A. ^$ M# u K' k# V
- Password=my_password
. }8 i7 y, h% F3 W9 e6 j* P - GetDriverFunc=getSQLDriverMYSQL3 A. L h) P( g1 J& x* |3 j
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 u) W7 N( I5 Z- k
- LibraryName=./libsqlmy.so
& ?1 r U/ u3 V i* O! T [2 T0 o - Active=1
% q7 w. l, a( [4 L2 a K - ---example---% a2 a8 w, X9 {) n6 z
9 I( Q: Q' o) u2 a/ g! `9 Q- On a windows box, also running the MySQL server locally, it would be:
# [0 n8 ^* M& F* \6 O* d; p9 t - ---example---0 k% |9 v" Z" T+ c( p
- [DBEXPRESS]
( P3 E! }. R4 e+ w8 e" {; K/ I, x - sqldir=mysql_sql/ I; W: R# U/ U. a! A5 Z& o4 W! V
- Drivername=mysql$ B! l8 l' Z7 @
- Database=test
3 ~1 B! f8 _1 {4 A3 `6 I+ W0 o - Hostname=127.0.0.1
$ g5 D' g1 {3 ?& } - User_name=testuser3 Z m* j; V( t4 \
- Password=my_password" ]' v- y9 U. Q+ v
- GetDriverFunc=getSQLDriverMYSQL5 D+ p* A# v/ c' e
- VendorLib=libmysql.dll
1 ]5 n1 K4 X! m - LibraryName=dbexpmysql.dll# G0 Y, ~, L5 I$ e: b
- Active=1
$ l6 ~/ T, I" U6 s2 u# [; v - ---example----
. x* C( h# R. Y$ s - - written 02.03.04 by pwk.linuxfan( l$ @9 a9 w! H5 h3 R. |% r. L+ l9 N
- 1 K4 L4 I! i# Z* @! Y9 l5 u. N
复制代码 |
|