|
|
麻烦翻译一下,下面这段文章:xhan
2 {0 a, Q" [9 Q& s$ \8 k
! ?) o4 {% G7 |& v, u; X-
1 U) p3 z J. q2 R - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
- F# C: p5 y. T
& a+ }' N/ ]9 {) D( I. |0 G" v' X- ### What we need ###: f$ }( P: G a
- Naturally, we will need a MySQL server to store the data for us, this document
+ @5 J- f5 i: Y - will not explain how this can be done - there are documents out there for the
& @3 u8 C3 N' o$ Z/ ], E - interested. The requirements include a (empty) database for TeamSpeak to use4 L- h7 K$ k6 Z1 P, g3 Y
- and a user account (username + password) that has the permissions to do stuff
Y4 r/ O+ @3 M4 w, ^% @9 w( i - with the database. Additionally, you will need a vendor library installed on the
% T T5 Z& S% J) z5 }5 n6 ]5 [ - local machine, this came with my MySQL install.# X x8 b# _+ e& c8 i( U
- These instructions will not tell you how you might transfer your data from the$ F: A. r( |, x' B/ e1 B, N
- SQLite database to the MySQL database, we start with a clean and empty MySQL
1 v5 K X5 F! x+ r9 _ - database.
" e- \& g d P - Some users have reported ways to import a SQLite database into MySQL, but at. n. x9 `) _4 M! S8 m
- the time of writing, there are still too many issues - check the current status
. T2 ^. Q4 K& N7 e2 A3 K - in the TeamSpeak forums if you are interested.. B8 R; t Y* Z- `* {. s# X4 f5 ^
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* S9 N8 J) x% `# E( X
- Borland was used. This driver can only interface with the client library that $ _9 |% q( _& e7 E
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 Z# T D' g# J( y& x4 _ - client library - basically all you have to do is to use a 3.x client library as
- q! i* T' _. }, H& v - "VendorLib" and a 4.x database to connect to.) X7 O" [- P3 @' m4 }' k
- If you need more info about dbExpress, you can contact Borland.
/ A. J, ^3 n( _# I
. K$ Z8 S7 a% G( Q, m3 x' w- ### Doing the work ###: r0 L$ P4 k; o( Y# G- o$ g! k
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 k* k4 ~' F1 S. `: s
- the perquisites right, just open your server.ini file, and add this section at
& l& d: @& \: d' ^" g K - the end: g ]2 v" F; U K
- ---cut here---7 [) G: E+ N! |3 }+ r1 p
- [DBEXPRESS]
) J4 C! H7 Q, f - sqldir=mysql_sql
$ J6 W0 b1 V6 E, G0 | - Drivername=mysql
( u2 U( X R w8 l - Database=Your_Database_Name_Here
7 h3 ]3 Q+ s7 D( |6 J0 q - Hostname=The_PC_the_MySQL-Server_is_on1 g+ k) G; B; G5 D A
- User_name=User_name_on_the_MySQL-Server
" P3 N) N/ \5 h6 H% ], I - Password=Password_to_go_with_above_user_name
B& n$ J! y4 e! f5 [* V - GetDriverFunc=getSQLDriverMYSQL
! g! V( X* A m1 n# N! U, ? - VendorLib=path_pointing_at_your_mysql_vendor_lib
. P& y& j8 X$ L& ]" W/ } - LibraryName=path_to_libsqlmy_libary/ m; N: k% h- w9 I! m1 q+ s. j
- Active=1) ]! c* |8 t" Y; z& W( ^9 |6 f
- ---cut here---
; x7 b6 `8 w% y2 T. B- Y/ Q - In my environment (a linux box with a MySQL server running locally) I have:
& f) U% {" l. U8 M9 ?3 ]3 B1 A - ---example---, a' J: _* z) O3 [
- [DBEXPRESS]6 j+ k% Y0 Q6 @. D
- sqldir=mysql_sql5 g- V2 e! b/ }
- Drivername=mysql* n, o f$ [4 v" w0 a3 h; g
- Database=test- f, _9 P$ X* g9 j1 K& N0 K
- Hostname=localhost6 G) n' k5 `4 v w; n
- User_name=testuser
( b6 P J9 _7 Q/ t( e; ?, t - Password=my_password
p: C% } v4 E- F0 ]8 b' O& { - GetDriverFunc=getSQLDriverMYSQL
. Y- R; O' R+ l Y9 ] - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0: ?; f9 ~) f; m" F* T0 |4 y
- LibraryName=./libsqlmy.so9 [* }" l) u6 j' @& s& }
- Active=1
2 T9 J* {0 w H9 ? - ---example---
- r) F' ~; y; E
, i ?( P, y; y2 a m8 `- On a windows box, also running the MySQL server locally, it would be:
/ ^2 K& c- t: T$ n8 W6 O* w, [. l& ] - ---example---* j! z/ m* r2 X6 X* o% a
- [DBEXPRESS]
% d9 a9 f4 \% x4 R# ]; p - sqldir=mysql_sql; _) {9 ^. {5 x2 J7 I
- Drivername=mysql
$ X1 C; G- _& Y' X7 k$ t: L - Database=test p5 a6 c# u: |6 O7 T
- Hostname=127.0.0.1
6 f* x$ \4 l8 D0 }8 H - User_name=testuser
- ]$ m# S; B* c5 Q' R) C - Password=my_password
* F3 I7 j; _' J# |& p% D - GetDriverFunc=getSQLDriverMYSQL
9 g2 x' M% B# r6 B4 y$ a5 P5 O - VendorLib=libmysql.dll
+ ^9 r5 a. {! q- O3 Y& q0 _ - LibraryName=dbexpmysql.dll
, ?6 E5 X. x* L- k - Active=1) @( f$ ]2 a1 c( x6 {# f8 x7 N
- ---example----( a* d8 Z$ K1 e
- - written 02.03.04 by pwk.linuxfan* @" g& m2 `4 P) \+ o/ ]
, z( O+ ~+ g- s
复制代码 |
|